Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I tried something that I asked chatGPT 4 and it failed. It tells me to look at the console for errors. What I did was copy and paste the text output from BeautifulSoup of a website and ask it write a python code that cleans this so it's easier for a machine learning model to handle.

EDIT 1: I then simplify the question and set it to expert mode. I ask ``` given some text after it was scraped by beautiful soup. write a python code that cleans this so it's easier for a machine learning model to handle ```.

I then copy and paste the output into the additional context section.

The code it gave me was how to use beautiful soup and to remove unnecessary white spaces. ChatGPT gave a more thorough answer which is to use some regex to clean the text.

EDIT 2: Got it to work better by setting it to expert mode and copy pasting the whole thing. It truncates a lot of the text and missed the question at the bottom. Then, after it gives some generic answer. I asked the question on using python to cleans this so it's easier for a machine learning model to handle. It gave me a much better answer and with the links on where it got it from.

Very cool tech. I'll be trying it a lot. Thank you.



Did you try using Expert mode?


I edited my post with more details.


Awesome. Glad it was better. We still have a lot of work to do :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: