DEV Community

Sa
Sa

Posted on

ChatGPT - is it strong and should you be wary of it?

I won't list the concerns that the chatGPT has raised among the average Internet user - there are tons of them, you can read for yourself.
But here I gave him an assignment: "Can you suggest a regular expression in PHP that would remove all attributes of all tags except src in the text?"...
After each answer he gave, the standard task clarification began:

  • only the SRC attribute should be left, the rest should be removed
  • the content of the SRC attribute should remain as well
  • this code doesn't work, check yourself
  • in this version the code does not work, because all attributes except style|class|alt remain

And so on.

After playing with it for about 10 minutes, I quickly found a solution here https://stackoverflow.com/questions/33093509/php-regex-remove-all-attibute-except-href-in-html and it is very correct at least from the position that it allows you to easily replace href with src, add a couple of attributes - that is, it gives a flexible, customizable solution. Chat could not give me such a result.

Hence two conclusions:

  1. At this stage, it is not worth being afraid of it - the revolution of cars is still postponed :)
  2. To use it, you need to be able to do what you are asking it to help you with!

And the second conclusion makes you wonder: what is the purpose of a chatGPT? The answer is simple - as a generator of ideas and directions for finding an answer! This is where it is great, as it gives us a squeeze of the entire Internet, saving us hours of searching and processing garbage!

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Retry later