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

Align RAG Pipeline Configuration for Inference and Evaluation in RAGLite #60

Open
undo76 opened this issue Dec 6, 2024 · 2 comments
Open

Comments

@undo76
Copy link
Contributor

undo76 commented Dec 6, 2024

I am encountering limitations with RAGLite when evaluating using RAGAS. The main issue is that the RAG pipeline configuration differs between inference and evaluation, which impacts consistency and reproducibility.

The differences include:
1. System prompt
2. Instruction prompt (where the context is added to a user prompt)
3. Number of chunks to retrieve
4. Number of chunk spans to retrieve

Questions

  • Does it make sense to include these differences as part of a unified configuration to ensure alignment?
  • Or should we explore an alternative mechanism to address this inconsistency?
@lsorber
Copy link
Member

lsorber commented Dec 6, 2024

For my understanding, are you concerned about a discrepancy between insert_evals and answer_evals (i.e., a difference between eval generation and inference), or between answer_evals and evaluate/Ragas (i.e., a difference between inference and evaluation of the inferences)?

@undo76
Copy link
Contributor Author

undo76 commented Dec 6, 2024

Yes, but I am working in a PR to add all the shared parameters in RAGLiteConfig. Still WIP, waiting for your comments when ready.

These are the parameters I am adding:

    search_method: Literal["hybrid", "vector", "keyword"] = "hybrid"
    system_prompt: str | None = None
    rag_instruction_template: str | None = RAG_INSTRUCTION_TEMPLATE
    num_chunks: int = 5
    chunk_neighbors: tuple[int, ...] | None = (-1, 1)  # Neighbors to include in the context.

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

No branches or pull requests

2 participants