Plans: propose chat context eval designs#1092
Draft
VoxelPrincess wants to merge 1 commit into
Draft
Conversation
Contributor
|
This PR was auto-closed. Only contributors approved with Maintainers review auto-closed issues daily. Issues that do not meet the quality bar in CONTRIBUTING.md will not be reopened or receive a reply. If a maintainer replies See CONTRIBUTING.md. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi — before jumping into evals implementation of #727 , I’d like to align on two design decisions: the measurement strategy and how much of the judge behavior nao should own.
Proposed designs: RAG triad vs Correctness, with Both as a design-only combined option.
Problem: As a nao user curating project context, I want to know when a change to my
rules.mdor semantic model definitions makes the chat agent hallucinate, use wrong terminology, or ignore my configuration — even when the SQL query returns the correct number.Goal: add context-quality evals alongside SQL tests. Exact numeric correctness stays in deterministic SQL tests;
nao evalswould cover semantic/context failures in the final answer. Known context failures become repeatable eval cases, and thresholds would be calibrated on real runs before they are used for pass/fail decisions.1. Measurement strategy: referenceless vs reference-based
There are three options:
Plan A — RAG triad only — referenceless. It evaluates Contextual Relevancy, Faithfulness, and Answer Relevancy. It assumes that if relevant context was used, the answer was grounded in it, and it addressed the question, then a correct answer is likely. It does not verify correctness directly. It also requires nao to capture content-bearing tool outputs and maintain a list of tools such as
execute_sql,read, andgrep.Plan B — Correctness only — reference-based. It compares the final answer with an expected answer. It assumes that if the final answer matches the expected output, then the context was likely good. It does not verify which context the agent used or explain whether a failure came from missing context, hallucination, or another cause. Every test case needs a maintained
expected_output.Plan C — Both — avoids relying on either assumption alone: the RAG triad checks the context-to-answer path, while Correctness verifies the final answer against the expected output. Judge ownership is still chosen in §2.
Summary of the three measurement options (§1):
id,inputid,input,expected_outputid,input,expected_output/api/evals/chatDecision needed: RAG triad, Correctness, or both?
2. Judge implementation: ownership
This decision is independent of the measurement strategy: it determines who owns the judge prompts and scoring behavior.
Decision needed: how much of the judge behavior should nao own?
Shared requirements
Both plans include prototype evidence. A short reply on the preferred measurement strategy and judge ownership, including a phased approach if appropriate, is enough to unblock implementation.