How to provide user context information using ConversationalRetrievalChain #6750
Unanswered
levalencia
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a chatbot which searches for documents in Azure Cognitive Search, then gets the results into ChromaDB and then gets a response back to the user using OpenAI. It works perfectly fine.
However I have failed to provide user context to the chatbot. Basically I want to tell: User is called John Smith, He is 70 years old, He likes baking and gardening.
Why?
Because in my documents I have information about ages, names and interests of my users. SO if the user asks, Who likes the same as me? Then the bot should know that I like baking and gardening and then use those keywords to search. However I have failed miserably in all my attempts.
I tried writing in the prompt:
If user asks for his name, answer John Smith
If user asks for his age, answer 70.
I also tried adding hardcoded chat history.
I also tried using the messages array, but that didnt work either.
Part of my code:
Beta Was this translation helpful? Give feedback.
All reactions