Skip to content

Conversation

@siddartha-10
Copy link

This PR:

  • Implements conditional retrieval.
  • For each of the user queries we find what type of a query is this i.e
    - Is this a clarification / follow up query or not. If yes then we use the previous context
    - If not we make a new retrieve call.

@siddartha-10
Copy link
Author

@liyin2015

@Unobtainiumrock
Copy link
Contributor

There's one primary area of concern for me here.

It appears that this would determine whether or not something is a follow-up question, based on the entire past conversation history.

However, the context that is retrieved by the line:

retrieved_documents = self.previous_retrieved_documents

Is the previous context.

Thus, there can be a scenario in which the model determines that "yes, this is a follow-up question", but it uses the previously retrieved documents, which might not be relevant to a question much further back in the conversation. (i.e. the question and response pair that triggered is_clarification = "true" in response.data.answer.lower() to be true.)

Here's some stuff from Adalflow that I suggest looking at that might be useful:

We can discuss more if you have more questions.

@siddartha-10
Copy link
Author

siddartha-10 commented Feb 12, 2025

Sure thing, I will work on your suggestions this weekend and then If i have anymore questions we can discuss. Thanks for the feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants