Closed OriHoch closed 1 year ago
get_vector_db_query(user_prompt)
get_documents_from_vector_db(query)
get_context_from_documents(user_prompt, documents)
get_prompt_with_context(user_prompt, context)
get_answer_from_prompt(prompt, documents)
get_vector_db_query(user_prompt)
- convert the user prompt to a relevant query for the vector DB (possibly using GPT)get_documents_from_vector_db(query)
- query the vector DB and get back document objects, listing them in a user friendly wayget_context_from_documents(user_prompt, documents)
- combine the user prompt and the document objects into a context textget_prompt_with_context(user_prompt, context)
- combine the user prompt and the context text into a GPT promptget_answer_from_prompt(prompt, documents)
- get the final answer from the GPT prompt (possibly including more details from the document objects)