Short answer: for an online course tutor, use a bounded retrieval architecture that can relax filters, switch to lexical search, or decline to answer, while every fallback preserves source identity and stays inside a per-query index-cost budget.

For an online course tutor built from healthtech training listings, the tempting design is one large vector index and a retry with a lower similarity threshold. That simple fallback is hard to audit. A lower threshold can turn an empty result into a plausible but irrelevant lesson, and indexing every description, transcript fragment, prerequisite, and provider update multiplies storage and refresh work before it proves better tutoring.

I would test a smaller design first: normalize listings once, index only the fields needed to find a course or lesson, and fetch the full teaching material after retrieval. The important experiment isn't “does fallback return something?” It is “does each recovery step return enough attributable evidence without spending more index capacity than the query deserves?”

How should online course tutor retrieval architecture handle fallbacks?

Treat retrieval as a state machine, not an open-ended retry loop. The first state searches the narrowest valid scope: the learner's enrolled course, current module, language, and publication status. A miss then follows one explicit edge. It may remove an optional metadata filter, search the approved catalog by exact terms, or stop. It must not silently cross a clinical specialty, use withdrawn material, or answer from an untraceable snippet.

Keep it bounded.

Misses differ.

In a catalog aggregated from multiple sources, “no result” has several meanings. The source may use a different specialty label. A new listing may have passed ingestion but not indexing. The learner may have typed an acronym absent from the embedding text. Or the answer may genuinely not exist in the approved corpus. Those states call for different actions, so the retriever should return a reason as well as documents. Use one internal result contract across the cascade: each candidate needs a stable source ID, course and lesson IDs, revision, retrieval mode, score, and the filters actually applied. The answer layer should never have to guess which fallback ran. This separation also lets the same evaluation trace exercise a hosted search service, a self-managed index, or a database-backed lexical search without changing the tutoring policy. The state transitions should remain visible in the trace even when two stages happen to return the same document, because the recovery path itself is part of the behavior being evaluated.

The catch is that a bounded cascade will decline some questions that a broad web search could answer. That is the right choice when the tutor must stay within reviewed course material. It is not suitable when the product promise is open-domain discovery; in that case, use a separately labeled corpus and a distinct evidence policy rather than quietly widening this one.

Make the experiment about evidence, not hit rate

Build a fixed query set before choosing index breadth. It should contain direct lesson-title lookups, paraphrases, source-specific terminology, ambiguous abbreviations, stale listing names, and questions with no supported answer. Keep the expected source IDs beside each query. The Retrieval-Augmented Generation paper frames generation around retrieved external memory; for this experiment, the operational consequence is straightforward: retrieval quality has to be evaluated independently from fluent generation.

A useful run compares the simple approach with the cascade. The simple arm performs dense retrieval against every indexed chunk and retries once with a relaxed score. The cascade arm begins with filtered dense retrieval over compact listing records, then uses a lexical pass over approved titles and aliases, then returns an abstention. Both arms receive the same query set and the same maximum candidate count. This is an experiment definition, not a benchmark result; the thresholds below are starting parameters and need calibration against the actual catalog.

Stage Allowed recovery Evidence requirement Stop condition
Filtered dense None In-scope source and revision Gate passes
Catalog lexical Exact titles and approved aliases In-scope source and revision Gate passes
Abstain No widening No supported evidence Return a visible miss
type RetrievalMode = "dense" | "lexical" | "abstain"; type Candidate = { sourceId: string; courseId: string; lessonId: string; revision: string; score: number; }; type RetrievalResult = { mode: RetrievalMode; candidates: Candidate[]; appliedFilters: Record<string, string>; reason: "enough_evidence" | "dense_miss" | "lexical_miss"; }; async function retrieveTutorEvidence( query: string, filters: Record<string, string>, ): Promise<RetrievalResult> { const dense = await searchDense(query, filters, { limit: 6 }); if (passesEvidenceGate(dense, { minimumCandidates: 2 })) { return { mode: "dense", candidates: dense, appliedFilters: filters, reason: "enough_evidence", }; } const lexical = await searchLexical(query, filters, { limit: 6 }); if (passesEvidenceGate(lexical, { minimumCandidates: 1 })) { return { mode: "lexical", candidates: lexical, appliedFilters: filters, reason: "enough_evidence", }; } return { mode: "abstain", candidates: [], appliedFilters: filters, reason: lexical.length === 0 ? "lexical_miss" : "dense_miss", }; } 

The gate should inspect more than a raw score. Require the source and revision fields, reject candidates outside the permitted catalog, and verify that enough distinct evidence remains after deduplication. A score isn't portable between retrieval modes, so don't compare a lexical score with a vector score as if they shared a scale. Calibrate each mode on labeled queries and let policy combine pass/fail decisions rather than unrelated numbers.

One awkward case deserves its own trace: two providers may publish near-duplicate listings with different prerequisites. If deduplication keeps only the highest-scoring text, the tutor can cite one provider while stating the other's requirement. Preserve source boundaries through ranking, then choose the exact listing revision before fetching teaching content. This is the kind of error a top-k hit-rate chart hides — the expected document may appear somewhere in the set while the final evidence bundle is internally inconsistent. The trace should therefore record candidates before deduplication, the identity selected afterward, and the revision used to fetch content; when the expected source is present but the final identity is wrong, count the query as a failure rather than partial success.

Put index cost in the control loop

Index cost at scale is driven by what is stored, how often it changes, and how many representations are maintained. Measure those components directly instead of treating the monthly invoice as a mysterious output. For each ingestion run, record source records read, records changed, chunks emitted, embedding inputs, index bytes added, and obsolete revisions removed. For each query, record candidate reads and fallback transitions. These are engineering counters; they reveal which design choice caused growth.

The compact index should contain discovery material: normalized title, aliases, specialty, audience, language, provider, stable identifiers, revision, and a short searchable description. Long transcripts and lesson bodies can remain in source storage until a listing is selected. This two-stage shape reduces duplicated indexed text when several aggregators expose the same course, but it trades some recall for lower index churn. If questions routinely target exact statements buried inside transcripts, a listing-only index is too coarse; use a separate lesson-content index with its own retention and evaluation policy.

Model the decision before deployment. Let R be active listing revisions, C the average indexed chunks per revision, B the average stored bytes per chunk including metadata, and U the fraction rewritten during a refresh. Stored index volume is approximately R * C * B, while refresh write volume is approximately R * U * C * B. The equation is intentionally plain. It forces a discussion about chunk multiplication and update frequency before anyone adds another representation “just in case.”

I'm not sure which representation will win for a given catalog because synonym quality, transcript structure, and update cadence are dataset properties. A replay with real redacted queries resolves that uncertainty. Your mileage may vary — especially when provider taxonomies disagree — but the counters make the variation visible instead of anecdotal.

Ship with failure states readers can see

A fallback is production-ready only when its outcome reaches both telemetry and the interface. Log the retrieval mode, reason, source IDs, revision IDs, filter changes, candidate count, duration, and index snapshot. Do not log raw health-related learner text by default; use a request identifier and a controlled redaction policy. The UI should distinguish an evidence-backed answer from “I couldn't find this in your approved course material.” An abstention is a result, not an exception.

Handle dependency failures separately from evidence misses. A rate-limit response such as HTTP 429 should enter a bounded retry policy with jitter and a deadline; it should not trigger broader retrieval, because service availability says nothing about relevance. Invalid source records should go to an ingestion review queue, not disappear during normalization. If the index snapshot and source revision disagree, withhold that candidate until the next valid snapshot rather than presenting mixed versions.

Before copying this architecture, measure evidence precision by fallback stage, supported-question recall, abstention accuracy, p50 and p95 retrieval latency, index bytes per active listing, refresh write volume, duplicate-source rate, and the percentage of queries that leave the narrow first stage. Also review a sample of false positives by source boundary. A cascade that sends most traffic to its broadest step is merely a broad search system with extra latency.

Ship the smallest cascade that passes those checks. Add a fallback only when a labeled failure category shows what it will recover, and give that edge its own cost and evidence budget. That discipline keeps a course tutor useful without letting fluent output hide weak retrieval.

References