extraction of keywords should be ignored when the LLM does not know or does not find them
lfoppiano opened this issue · comments
If the LLM does not know or does not find them, we end up having strange keywords (from I'm sorry
to more real like 'text', 'extraction', 'keywords, etc...)
Would be possible to detect it and just return an empty list for the element?
One option is to add in the prompt something like "If you don't find any keyword, just answer [] or None" and catch that in the response
It depends on the LLM but typically, this would be handled by indeed prompt engineering. Making sure that you give clear directions with respect to the output it should give. If you make it give a default answer, like `"No Keywords Found", you can perform some postprocessing yourself to filter those out.
Thanks. I was not sure about your answer, but then I found that indeed we can pass our custom prompt.