Re:Ask HN: Best Practices for LLM Chatbot that references us...
by olives on Wednesday July 24, 2024 @09:51PM
(#41064049)
Is function calling the only way to do this? If the user account has some associated text, for example, historical medical files, is there a way to pass that text in such that the user could query "Write a short summary about my medical history?"
[ Parent
| on HN ]
Re:Ask HN: Best Practices for LLM Chatbot that references us...
by fanweixiao on Thursday July 25, 2024 @06:02AM
(#41066786)
You can create a function calling, the parameter is the user_id or a fingerprint of the user for backend. then, get all data from your database, returned as a JSON object, then, you will get the result.
The prompt will looks like:
""" you are a professional medical history recorder, write a short summary about the user's medical history, use tool_call when possible.
the current user_id is: abcd12345 """
your tool_call description should be set clearly, looks like:
""" get medical history by given user_id """