Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Knowledge - actually inject context based on user input #326

Open
cjellick opened this issue Aug 28, 2024 · 4 comments
Open

Knowledge - actually inject context based on user input #326

cjellick opened this issue Aug 28, 2024 · 4 comments
Assignees

Comments

@cjellick
Copy link
Contributor

From a convo with Thorsten:

Right now, it is pretty naive: we have a static context that says something dumb like "you have an ad hoc rag tool..." and then we rely on the LLM deciding to call retreival

I think it's time to do a proper "Retrieval Augmented Generation" wherein we write a context tool that looks at the input from the user, figures out if knowledge has relevant information about that input, and if it does, go ahead and add it as context.

My success criteria is:

  1. That the quality for when there IS a match stays the same as it is now - so to test it ill do question similar to ones ive done in the past and expect results to be as good or better
  2. That the behavior when there IS NOT a match is better - right now i feel you have to coax the assistant to answer from its training data or from the internet tool if the knowledge tool is present
  3. I dont have to coax it into using calling konwledge. its completely transparent
@iwilltry42
Copy link
Contributor

Ref gptscript-ai/knowledge#93

@iwilltry42
Copy link
Contributor

Keeping some notes here:

@iwilltry42
Copy link
Contributor

Large changes to how knowledge is integrated: #385

@sangee2004
Copy link

Tested with build from b6c00b5330eb

We now see Knowledge Retrieval Context being added when there are queries made relating to knowledge files.

Image

While testing this feature , there were couple of instances were I see the queries made relating to the knowledge file are not being answered from the knowledge file. In these cases , output from knowledgeInstruction is empyt ( No data retrieved from knowledge base.).

Stack Trace shows this:
Image

Detailed steps to reproduce the issue is tracked in the following 2 issues:
#336 (comment)
#402 (comment)

@sangee2004 sangee2004 reopened this Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@cjellick @iwilltry42 @sangee2004 and others