Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Optimize docs search hyper parameters #320

Closed
creatorrr opened this issue May 7, 2024 · 0 comments
Closed

Optimize docs search hyper parameters #320

creatorrr opened this issue May 7, 2024 · 0 comments

Comments

@creatorrr
Copy link
Contributor

creatorrr commented May 7, 2024

Let's run an automated evaluation on the RAG dataset (using a local model or something) and then tune the doc search hyperparameters based on this. Parameters are:

  • num docs k_docs
  • confidence docs_confidence

https://github.com/julep-ai/julep/blob/dev/agents-api/agents_api/models/entry/proc_mem_context.py#L13

rag dataset: rag-12000
contains three columns: context, question, answer

evaluation recipe:

  • create an agent

  • add all the documents from the context column as agent docs

  • for every row in the dataset (use the train split only)

    • create a session with the agent
    • ask the question from question column (you can set max_tokens to 1 since we dont care about the returned answer)
    • note the document-ids returned from session.chat
    • get all documents using the document ids
    • check if context (value of that row) is in the fetched documents

cool thing: optuna: https://optuna.org/

@creatorrr creatorrr added good first issue Good for newcomers bounty program difficult and removed good first issue Good for newcomers labels May 30, 2024
@julep-ai julep-ai locked and limited conversation to collaborators May 30, 2024
@creatorrr creatorrr converted this issue into discussion #361 May 30, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants