← SYNTRIX AI PLAYBOOK / CORRECTIVE ACTIONS
PLAYBOOK ENTRY 003 · RAG & DOCUMENT SYSTEMS · NOVEMBER 24, 2026

RAG Beyond Retrieval.
Engineering a Source-Verifiable Research System

Inside ERLA's retrieval, ranking, provenance and verification methodology—and the safeguards needed before treating an AI research result as engineering evidence.

EVIDENCE & VERIFICATION SUMMARY
Review basis
RAG source-code analysis and historical retrieval evaluation
Evidence
ERLA search, ranking, verification modules and evaluation records from October–November 2026
Disposition
Implementation reviewed; individual outcomes depend on configuration and dataset
Limitations
Private source files are not publicly accessible. Historical retrieval metrics are not proof of final-answer accuracy.
Last editorial review
24 Nov 2026
THE SYNTRIX PRINCIPLE
A retrieved document is not a verified answer. A credible engineering RAG system must connect the question, the correct source, the applicable data, the calculation and the evidence that supports the result.

For an engineer, the research problem is rarely just “find a document.” It is more exacting: find the governing relationship or allowable, establish the correct edition and conditions, preserve the units and basis, and show where the answer came from. AI can accelerate the search, but a fluent answer is not proof that any of those steps succeeded.

ERLA—the Engineering Research Library Agent—was built around that distinction. It is a retrieval system with specialized engineering research rules, deterministic checking and recorded evaluation evidence. This article examines its actual implementation and documents where those controls remain conditional.

30-SECOND READ

What ERLA's RAG design teaches

ERLA combines lexical search for exact technical identifiers, dense vector search for semantic matches, optional sparse retrieval, reciprocal rank fusion (RRF), document-level ranking, source-quality priors and optional local cross-encoder reranking.

It then separates retrieval from evidence verification: source values must be checked at opened document locations; conversions and certain calculations can be checked by deterministic code. Golden evaluations measure search behavior, and a ranking-evidence register constrains changes without supporting measurements. None of this implies that every generated answer is automatically correct.

01 / THE ENGINEERING RESEARCH BOTTLENECK

Finding a document is fast. Establishing the correct basis takes more work.

Consider an analyst looking for a material property, a fatigue curve, a stress concentration factor or a fracture-toughness value. A simple keyword search may find a page mentioning the correct alloy but return the wrong temper or thickness range. A semantic search may retrieve an excellent general discussion that contains no applicable numerical allowable.

The engineer still has to resolve material form, orientation, temperature, design basis, source edition, units and whether the selected equation applies. The RAG design must preserve those distinctions rather than hiding them beneath a confident paragraph.

RETRIEVED

“A document mentions the requested property.”

Candidate evidence — not a validated property
VERIFIABLE

“The relevant source was opened; value, units, conditions and locator were checked.”

Evidence tied to its original context
02 / IMPLEMENTED ARCHITECTURE

How ERLA's retrieval pipeline works

The main implementation in erla/search.py describes the following configurable sequence. This is a capability map, not an assertion that every optional component is enabled in every installation.

The retrieval layer produces candidates; the verification layer determines what can be responsibly claimed from those candidates. This separation is a defining feature of the implementation.

03 / EXACT MATCHES

Why BM25F matters in engineering RAG

Engineering references contain identifiers that semantic similarity can blur: material designations, standard numbers, revision labels, equation symbols, and property abbreviations. ERLA's erla/bm25.py implements an exact BM25F-style scorer using SQLite FTS5 statistics, with text, title and path fields. The documented implementation scores all matching chunks before truncating the candidate list for fusion.

The field-aware scoring lets a title or library path contribute differently from the body text. ERLA also expands queries through configured synonyms. A term's presence is still only a relevance signal: a high BM25F score does not establish the source's authority or the applicability of a tabulated value.

LEXICAL RELEVANCEBM25F = weighted term frequency × inverse document frequencyConceptual summary. ERLA's actual implementation includes field-length normalization and configurable parameters.
04 / SEMANTIC MATCHES

Dense retrieval complements exact terminology

ERLA's erla/embed.py generates local dense embeddings with fastembed/ONNX. Its documented default is BAAI/bge-small-en-v1.5; vectors are L2-normalized and stored in float16 form. A FAISS index can search vectors, with a NumPy matrix-search fallback when FAISS is absent. The implementation avoids embedding exact/near-duplicate documents and tracks embedding signatures to prevent mixing incompatible vector states.

Semantic retrieval helps when the relevant idea is expressed using different terminology. It does not, by itself, guarantee that the selected document contains the governing formula or numerical value. ERLA can also use an optional learned sparse channel, but the evaluated engineering-library configuration discussed below had that channel disabled.

05 / FUSION & RANKING

RRF combines candidates without treating scores as comparable

ERLA fuses retrieval rankings with reciprocal rank fusion. This is useful because a BM25F score and an embedding similarity are not naturally on the same numerical scale. The system then applies chunk-to-document logic, filters, controlled source priors and optionally a local cross-encoder that jointly evaluates query and candidate passage.

RECIPROCAL RANK FUSIONRRF(d) = Σᵢ wᵢ / (k + rankᵢ(d))Rank-based fusion; weights and k must be treated as configuration choices subject to evaluation, not universal constants.

The search implementation supports intent profiles for property lookups, general research and locating files. Optional ranking components include source-authority tiers, standard-number priorities, OCR considerations, document-level aggregation and diversity. These are ranking preferences—not replacements for opening and checking a source.

06 / MEASURED RESULTS

More retrieval technology does not automatically improve results.

ERLA's docs/evals/README.md reports a 2026-10-30 evaluation on a reviewed 122-question golden set, with 110 scored questions and 12 negatives, using an indexed site of 4,136 documents and 441,169 text chunks. These figures describe that recorded test configuration, not the current size of a public ERLA user's library.

COUNTERINTUITIVE FINDING

Dense + BM25 versus BM25 alone

The recorded comparison reported an nDCG@10 difference of −0.005 for BM25 plus dense retrieval relative to BM25 alone, with a paired interval spanning zero. The audit classified the difference as not detectable on that measured set—not proof that dense retrieval is universally useless.

By contrast, one recorded default-reranker comparison showed a positive measured difference. The lesson is not “always use model X.” It is measure each proposed change against representative questions before accepting it.

Evaluation metrics have different meanings. Recall@k asks whether relevant evidence enters the candidate set. nDCG@10 measures the quality of top-ranked results under relevance grades. MRR assesses how quickly the first relevant result appears. None directly proves that a final engineering calculation or factual claim is correct.

ERLA's repository also includes a synthetic 52-case deterministic evaluation suite and a retrieval golden set, with held-out cases and release-gate checks. Its private-library evaluations and shipped synthetic cases serve different purposes and should not be conflated.

07 / SOURCE INTEGRITY

From relevant passage to defensible evidence

ERLA's erla/verify.py reopens source locators to check submitted values. Where supported, it examines units near the value, validates source inputs for conversions and recomputes conversions deterministically. Its erla/packetgate.py requires verification evidence for recorded/exported Result Packets, while erla/answergate.py checks certain final-answer paths in Claude Code.

These controls have deliberately bounded meaning. A string match in a source is not the same as establishing the correct row, column, material condition or physical interpretation. OCR errors and unextracted tables can prevent verification, and output enforcement differs by runtime environment.

ERLA END-TO-END EVALUATION · 02 NOV 2026

When the right reference is present but the value cannot be verified

ERLA's recorded end-to-end evaluation identified technical cases where table extraction lacked sufficient row/column context to confirm the requested values. Even when the agent could identify the likely page, verification returned an UNCONFIRMED disposition rather than pretending the value was checked. That is the appropriate behavior for a system prioritizing evidentiary integrity.

CORRECTIVE ACTION: Repair table extraction or visually inspect the original page, preserve all material and test conditions, rerun verification and retain the unresolved status until the evidence actually supports the claim.

08 / CONFIGURATION CONTROL

Why retrieval tuning needs an evidence register

The docs/decisions/ranking_evidence.yaml register tracks ranking settings and implementation fingerprints. The documented protocol requires supporting sources, a measurement against a comparison run and owner approval before certain ranking-default changes are accepted. That rule followed an October 2026 incident in which an agent proposed an unsourced RAG tuning grid and invoked research from memory.

It is an important methodological distinction: an AI agent may propose a parameter change, but the proposal is not evidence that the parameter improves the system. Ranking changes should be reviewed with measured retrieval results, documented evaluation scope and an explicit owner decision.

SYNTRIX AI SEVERITY INDEX (SAI)

Risk depends on which part of the evidence chain failed.

A missing citation for a casual research lead does not carry the same consequence as an unsupported material allowable used in a structural design decision. The assessment should consider reliance, potential consequence, traceability, retrieval coverage, verification completeness and whether the failure could escape detection.

LOW0–19
WATCH20–39
ELEVATED40–59
HIGH60–79
CRITICAL80–100

No actual SAI score is assigned to ERLA. A numerical score would require a defined use case, collected evidence and a scoped assessment.

09 / CORRECTIVE ACTION PROTOCOL

When engineering RAG produces weak or unsupported results

01 · RETRIEVAL MISS

Inspect the query's terms and expected source, test identifier-focused lexical search, examine synonyms and filters, and measure recall before expanding model complexity.

02 · WRONG DOCUMENT OR EDITION

Validate the standard, revision, source-authority tier and conditions. Reject an apparently relevant document when its applicability is unproven.

03 · UNSUPPORTED NUMERIC CLAIM

Open the original locator and inspect units, table row, column and qualifiers. Mark NOT VERIFIED if any required evidence is missing.

04 · CONFLICTING SOURCES

Report both values with their conditions and citations. Do not average dissimilar allowables or silently select the most convenient figure.

05 · SEARCH QUALITY DEGRADES

Re-run the same golden cases, compare nDCG/recall and examine failures by question class. Do not promote changes without traceable measurement.

06 · FINAL ANSWER OUTRUNS THE EVIDENCE

Bind user-visible values and claims to verification records. Explicitly identify unchecked calculations or unsupported conclusions.

AGENT INSTRUCTIONADD TO YOUR RAG OR AI CODING AGENT BEFORE DEVELOPMENT

This reusable development protocol is a generalization inspired by ERLA's implementation. It is not a verbatim copy of ERLA's internal policies.

COPY-READY SOURCE-GROUNDED RAG RULE
## Source-Grounded RAG Development Protocol

Before changing retrieval, ranking, or answer logic:

1. Define supported question classes, source authority,
   required metadata, and answer acceptance criteria.
2. Preserve exact identifiers, units, basis, edition,
   material condition and original document locators.
3. Use lexical and semantic retrieval only where
   justified by representative evaluation results.
4. Record candidate provenance, ranking settings,
   selected passages and retrieval failures.
5. Open the original source before reporting a value.
   Check table row, column, units and applicability.
6. Distinguish RETRIEVED from VERIFIED.
   Label unsupported claims NOT VERIFIED.
7. Test negative cases, conflicting sources, OCR
   failures, missing values and unsupported editions.
8. Run an unchanged golden set before and after
   every retrieval or ranking change. Record metrics.
9. Do not invent citations, parameter justifications
   or reported improvements. Require owner approval
   for evidence-sensitive defaults.
10. Report the evidence gaps, test coverage, remaining
    risks and the exact corrective actions taken.

Never present a plausible RAG answer as an
independently verified engineering result.
FREE PUBLIC ERLA PLUGIN

Explore the RAG methodology with ERLA

The public ERLA repository provides the free core research agent as a Claude plugin with MCP-backed tools. It can search locally indexed engineering documents, return source-grounded Result Packets and help make the research process more traceable. The public core is not the same as the complete private development system reviewed for this article.

For current supported platforms, prerequisites, plugin installation and release details, follow the README on the public repository. No local-drive files or private repository downloads are linked here.

10 / SOURCE BASIS & LIMITATIONS

What was inspected

This article is derived from the ERLA development repository's erla/search.py, erla/bm25.py, erla/embed.py, erla/rerank.py, erla/verify.py, erla/packetgate.py, erla/answergate.py, evals/harness.py, docs/evals/README.md, docs/decisions/ranking_evidence.yaml and historical audit/evaluation reports. These source files are private; the descriptions here are technical summaries, not a release of confidential document-library contents.

Public software and installation reference: ERLA Public repository ↗. For general concepts, see SQLite FTS5 ↗ and FAISS ↗.

Measured values cited above describe the historical dataset and evaluation settings, not a universal performance guarantee or a test of a reader's installed public ERLA version. The article does not claim that RAG replaces qualified engineering verification.

THE SYNTRIX PRINCIPLE

Retrieval finds candidates. Verification establishes what they prove.

Measure the search pipeline, open the source, preserve its conditions and keep unsupported conclusions explicitly unverified.

← All Playbook Entries
Browse reusable protocols ↗Recent Playbook updates ↗About the methodology ↗
Discuss this article in SYNTRIX Community ↗