Ask HN: NLP Using Chat UI

1 malshe 2 8/14/2025, 4:53:29 PM
I use OpenAI API for doing NER tasks and also aspect-based sentiment analysis. It works pretty well. Recently, someone asked me whether ChatGPT can do the same analysis by uploading the text in the chat UI. I tried it and found the results pretty weak compared to what I get from the API. The reason for this is that ChatGPT just writes Python code and uses off the shelf NLP modules to conduct this task.

Any ideas for getting around this issue? I want ChatGPT to generate the text not the Python code and execute that code.

Comments (2)

cristoperb · 2h ago
Haha, the fact that an LLM tries to offload NLP jobs to Python libraries is funny. But I just tried this prompt (with "Don't use python") and uploaded a text file and it worked well (it immediately started outputting entities without running Python):

"NER task: extract all named entities from this text. Don't use python. JSON format"

I tried Gemini too, and it works without needing to tell it to not use Python.

The API is still better, of course, because you can constrain output to a JSON schema of your choosing... but all models now seem quite good at outputting valid JSON when asked and can follow 1-shot schema examples

malshe · 1h ago
Oh wow! Thanks for running this. I did not think about explicitly telling it not to use Python. I will try it now!