AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

How Engineering Teams Evaluate and Benchmark Dust Assistant Retrieval Accuracy Using Custom Test Sets and Run Evals

Serene Tay · 365Finds Editorial
Indexed 88,650 Wiki articles

Put 365 Wiki to work with your AI

Copy the prompt below, paste it into the AI you already use, then ask your question.

Download full Skill

Try it with the prompt first. If you use 365 Wiki often, install the full 365Wiki Skill so you do not have to paste it again. No regular AI? Gemini or Microsoft Copilot on the web will work.

365Wiki Skill

Relying on "vibe checks" to test enterprise AI assistants is engineering negligence.

Most engineering teams discover this the hard way. You connect Dust to your core corporate data silos—Notion wikis, Google Drive architecture docs, GitHub pull requests, and active Slack channels. In the initial demo, your custom Dust assistant answers three tricky technical questions flawlessly. Leadership is thrilled, and you roll it out to fifty engineers.

Two weeks later, the cracks appear. An engineer asks about the current API rate limit, and the assistant cites an obsolete 2023 design doc instead of the updated Q3 engineering spec. Another developer asks how authentication tokens are rotated, and the assistant confidently hallucinates a procedure that never existed in your codebase. In response, you open the Dust assistant builder, tweak the system instructions, add another filter to the connected space, ask the assistant two test questions in the preview panel, and hit save.

You solved the rate limit question. But you have no idea whether that prompt tweak quietly broke twenty other queries.

At 365Finds, we evaluate enterprise AI stacks through a clear commercial lens: an assistant that cannot be objectively benchmarked cannot be trusted with mission-critical workflows. Dust provides exceptional infrastructure for multi-source knowledge orchestration, but scaling custom assistants requires treating them like production software. That means building curated golden test sets, executing batch Run Evals, quantifying retrieval precision, and locking down regression gates in your delivery pipeline.


The Vibe-Check Trap and Why Static Evals Alone Fail

When an assistant misbehaves, the root cause is almost always one of three failures:

  1. Retrieval Miss (Recall Failure): The retrieval engine failed to pull the authoritative document into the context window.
  2. Context Drowning (Precision Failure): The engine pulled ten document chunks, but eight of them were noisy Slack chatter, burying the single relevant Notion paragraph.
  3. Synthesis Drift (Faithfulness Failure): The right context was retrieved, but the underlying LLM ignored the facts, over-generalized, or hallucinated due to vague instructions.

Manual sampling cannot isolate these failures. Human testers do not remember historical edge cases, cannot calculate chunk recall, and will never spot semantic drift across thirty queries.

At the same time, traditional machine learning evaluation—borrowed from offline classification models—presents its own severe trap. As Jules Belveze on the Dust engineering team highlighted in "From Evaluation to Maintenance", enterprise AI agents operate in a fundamentally fluid environment. Your engineering team updates Notion pages hourly, merges code daily, and creates hundreds of Slack threads. A static golden dataset of five hundred questions assembled in January will be actively giving false negatives by March because the underlying ground truth shifted.

At 365Finds, our conviction is that engineering teams must adopt a disciplined hybrid model: a lean, high-signal Golden Benchmark Dataset (30 to 50 test pairs) combined with automated Dust Run Evals for prompt iterations, tightly coupled to continuous production observability for knowledge drift.


Anatomy of a Production-Grade Dust Benchmark Dataset

Do not start by collecting hundreds of random questions. A bloated test set creates maintenance fatigue and gets abandoned. Instead, build a focused dataset of 30 to 50 test cases categorized across four operational archetypes:

Test ArchetypeTarget Failure ModeExample QueryGround Truth Verification
Direct Factoid RetrievalLow Recall@K; Chunk splitting cuts key data"What is our default gRPC connection timeout for auth services?"Requires exact chunk match from Notion infrastructure spec.
Multi-Hop SynthesisIncomplete cross-source assembly"What changed in the billing service deployment between v2.1 and v2.2?"Combines GitHub release notes with a Notion architecture RFC.
Conflict & DisambiguationAuthority confusion; Recency bias"What is the official procedure for database migration rollback?"Must cite authoritative Notion runbook; must reject contradictory Slack threads.
Adversarial / Negative ScopeHallucination under uncertainty"Where can I find the credentials for the staging payment gateway?"Must refuse to answer and explicitly state no credentials are stored in documentation.

Designing the Schema

Dust allows datasets to be maintained as structured JSON objects or tabular records. Structure each entry in your custom benchmark dataset with explicit metadata:

{
  "test_id": "eval_eng_042",
  "archetype": "conflict_disambiguation",
  "query": "What is our customer data retention SLA upon account deletion under GDPR?",
  "golden_answer": "Customer personal data must be purged within 30 days of deletion request, except billing invoices retained for 7 years for tax audits.",
  "target_document_ids": [
    "notion_space_legal/gdpr_compliance_policy_2025.md"
  ],
  "prohibited_document_ids": [
    "slack_channel_general/thread_archive_2022.json"
  ],
  "critical_facts": [
    "30 days for personal data purge",
    "7 years retention for billing invoices"
  ]
}

By defining both target_document_ids and prohibited_document_ids, you evaluate not just whether the model gave a plausible answer, but whether it retrieved the authoritative document while ignoring superseded chatter.


Building the Dust Run Evals Engine

Dust provides two architectural routes for running evals: native Dust Apps using sequential execution blocks, and automated test runners built via the Dust API.

flowchart TD
    A[Benchmark Dataset: Golden Q&A Pairs] --> B[Input Block / Batch Runner]
    B --> C[Dust Assistant / Data Source Retrieval]
    C --> D[Extract Retrieved Chunks & Model Output]
    D --> E[LLM-as-a-Judge Evaluation Block]
    E --> F[Code Block / Metric Aggregator]
    F --> G{CI Regression Gate}
    G -->|Pass: All Thresholds Met| H[Deploy Updated Assistant]
    G -->|Fail: Recall/Faithfulness Drop| I[Block PR & Inspect Traces]

The Dust App Evaluation Pipeline

When building an evaluation runner directly inside Dust's developer framework, configure four consecutive blocks:

  1. input Block: Connects to your benchmark dataset. When executed, it iterates across every test record, feeding the query and ground-truth metadata downstream.
  2. data_source or assistant Call Block: Executes the query against your target Dust assistant or directly queries the connected data sources (Notion, Google Drive, GitHub). The block captures:
    • The generated response text.
    • The array of retrieved document chunks (env.state.data_source.documents).
    • Document metadata, source URLs, and relevance similarity scores.
  3. llm Judge Block: Implements an LLM-as-a-Judge pattern using an advanced reasoning model (such as Claude 3.5 Sonnet or GPT-4o). The prompt instructs the judge to evaluate the output against strict criteria rather than subjective style.
  4. code Block: A lightweight JavaScript or Python block that parses the judge's structured output and computes deterministic mathematical scores across the entire batch.

The LLM Judge Prompt Structure

Your evaluation prompt must enforce rigid scoring categories. Avoid asking "Rate this answer from 1 to 10." LLMs produce erratic distributions on arbitrary number scales. Instead, force categorical verdicts:

You are an expert technical QA judge evaluating an enterprise AI assistant.
Compare the Assistant Output against the Provided Context and Golden Reference.

[EVALUATION INPUTS]
User Query: {{env.state.input.query}}
Golden Answer: {{env.state.input.golden_answer}}
Critical Facts Required: {{env.state.input.critical_facts}}
Retrieved Chunks: {{env.state.assistant.retrieved_chunks}}
Assistant Output: {{env.state.assistant.output}}

[TASKS]
1. Context Recall: Were all Critical Facts present in the Retrieved Chunks? (true/false)
2. Answer Faithfulness: Does the Assistant Output contain any statement NOT supported by the Retrieved Chunks? (true/false)
3. Factual Completeness: Does the Assistant Output cover every Critical Fact? (true/false)
4. Source Attribution: Did the assistant correctly cite the target document without citing prohibited sources? (true/false)

Return a strictly valid JSON object:
{
  "context_recall": boolean,
  "faithfulness": boolean,
  "completeness": boolean,
  "attribution_pass": boolean,
  "failure_reason": "string or null"
}

Four Metrics That Actually Matter

Traditional text comparison metrics like BLEU or ROUGE are completely useless for AI assistant evaluation; an assistant could rephrase an architecture concept brilliantly and receive a zero ROUGE score.

At 365Finds, we recommend tracking four objective metrics across every eval run:

1. Retrieval Recall@K (Target: $\ge 90%$)

The percentage of test cases where the necessary authoritative document chunk was present in the top-K retrieved context chunks. If Retrieval Recall drops, the problem is not your prompt—it is your search configuration, chunking boundaries, or vector space indexing.

2. Context Precision / Noise Ratio (Target: $\ge 60%$)

The ratio of relevant retrieved chunks to total retrieved chunks. If your assistant pulls 10 chunks to answer a query, and 7 of them are off-topic meeting notes from Slack, your context window is polluted. High noise directly correlates with hallucinations.

3. Answer Faithfulness (Target: $\ge 95%$)

Measures whether every factual claim in the assistant's answer can be traced directly to the retrieved chunks. In enterprise engineering, ungrounded speculation is a critical failure.

4. Negative Query Refusal Rate (Target: $100%$)

When presented with queries outside the documentation scope or asking for confidential secrets, does the assistant reliably refuse? We accept zero compromise on this threshold. A single hallucinated staging credential or phantom security policy is unacceptable.


Diagnosing Context Fractures: How to Fix Identified Failures

When an eval run fails, do not immediately rewrite the assistant prompt. Use the eval telemetry to pinpoint the exact breakage layer:

flowchart TD
    A[Eval Test Case Failed] --> B{Did Retrieved Chunks contain the Golden Fact?}
    B -->|No: Recall Failure| C{Is the Document in the Connected Space?}
    C -->|No| D[Data Sync Missing: Re-index or Update Connector]
    C -->|Yes| E[Query-Document Semantic Mismatch: Adjust Space Scoping or Hybrid Search Query]
    B -->|Yes: Retrieval Succeeded| F{Did Assistant Output match Golden Answer?}
    F -->|No: Faithfulness Failure| G[Prompt Grounding Weak: Enforce 'Rely Only on Context' in Instructions]
    F -->|No: Noise Distraction| H[Context Drowning: Reduce Max Chunks or Restrict Slack Data Sources]

Scenario A: Retrieval Miss (Recall Failure)

Scenario B: Context Drowning

Scenario C: Uncontrolled Hallucination


Establishing CI/CD Regression Gates

The ultimate value of Dust Run Evals is preventing silent regressions. Every assistant prompt modification, model provider switch (e.g., switching from Claude 3.5 Sonnet to GPT-4o), or data source reconfiguration should live in version control and pass through an automated evaluation gate.

Here is an example GitHub Actions workflow using the Dust API to benchmark an assistant before updating production:

name: Benchmark Dust Assistant

on:
  pull_request:
    paths:
      - 'assistants/engineering-agent/instructions.md'
      - 'assistants/engineering-agent/config.json'

jobs:
  run-evals:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.11'

      - name: Install Dependencies
        run: pip install requests pydantic

      - name: Run Dust Evals Suite
        env:
          DUST_API_KEY: ${{ secrets.DUST_API_KEY }}
          DUST_WORKSPACE_ID: ${{ secrets.DUST_WORKSPACE_ID }}
        run: |
          python scripts/run_dust_evals.py \
            --dataset ./evals/golden_benchmark_dataset.json \
            --config ./assistants/engineering-agent/config.json \
            --min-recall 0.90 \
            --min-faithfulness 0.95 \
            --min-refusal 1.00

If a prompt change increases conversational friendliness but causes Answer Faithfulness to drop from 96% to 91%, the build fails, the pull request is blocked, and the breakage is caught before your engineering team receives incorrect advice.


The 365Finds Verdict: Evaluation Is Continuous Maintenance

Our stance at 365Finds is unambiguous: teams that treat AI assistant deployment as a one-time build project will watch their assistant degrade within ninety days.

Dust excels because it eliminates the tedious plumbing of enterprise connectors and vector pipelines. But that architectural ease makes it dangerously tempting to deploy without safeguards.

Static golden test datasets are essential for catching regression bugs during prompt and model updates. However, they must be treated as living artifacts. Combine your pre-deployment CI evals with Dust's runtime feedback mechanisms—monitoring user thumbs-down signals, reviewing conversational traces, and using features like Dust Sidekick to convert production failures into new test cases.

Engineers do not deploy code without unit and integration tests. Stop deploying enterprise AI assistants without benchmark evals.


References