An online course tutor has one constraint that changes the whole retrieval design: a plausible answer from the wrong lesson is worse than a visible refusal.

Short answer: use a bounded fallback ladder that relaxes retrieval one condition at a time, preserves course and access boundaries, and abstains when no candidate clears an evidence threshold. I would choose that over an automatic jump from vector search to an ungrounded model answer. It keeps failures inspectable, and it puts index cost where it can improve recall instead of hiding weak evidence.

This isn't a vendor decision. It is a contract between indexing, retrieval, and answer generation.

How should an online course tutor retrieval architecture handle fallbacks?

Start with the invariants. A request belongs to a course, a user has a defined access scope, and the returned passages must identify their source material. A fallback may change the search method or widen an allowed content scope; it must not silently cross enrollment or publication boundaries. That distinction matters because "try something broader" sounds harmless until a tutor retrieves an instructor-only note or a similarly named lesson from another course.

The original RAG paper describes generation that combines parametric memory with retrieved, non-parametric memory. That split is useful here: retrieval supplies inspectable evidence, while the generator turns that evidence into an answer. If retrieval produces no acceptable evidence, generation hasn't somehow repaired the missing half of the system.

So I model fallback as a small state machine:

  1. Search the current lesson with the normal query representation.
  2. Search the same course, retaining the same access and publication filters.
  3. Retry with conservative query normalization, still inside the course boundary.
  4. Return an abstention with useful next actions when the evidence gate fails.

No magic fifth step.

Each transition needs a reason code such as NO_CANDIDATES, BELOW_EVIDENCE_GATE, or FILTERED_BY_SCOPE. Those codes are more useful than one generic "search failed" bucket: they let a team distinguish an index coverage problem from an intentionally restrictive permission check. They also prevent the UI from promising that another retry will help when the correct result is an abstention.

The constraint that changed my choice

Index cost at scale is not just storage. Every extra representation has to be produced, written, refreshed when course content changes, and queried during evaluation. Chunking a transcript three ways and maintaining multiple embedding variants may improve the opportunity to retrieve something, but it also multiplies the surfaces that can become stale. I don't assume that more indexed copies mean better tutoring.

For a developer-tools team building an internal knowledge-base bot, I use the same accounting discipline I would use for the course tutor. Let D be indexed document variants, C the chunk count per variant, U the number of content updates, and Q the number of retrieval paths exercised per question. A useful planning model is proportional rather than monetary: index work grows with D × C × U, while query work grows with Q. It is not a vendor bill calculator. It is a way to spot a design that pays repeatedly for speculative recall.

That makes query-time fallback attractive when the corpus has clear hierarchy. The first attempt can search a small lesson partition. The second can widen to the course partition without creating another copy of every chunk. The catch is latency: serial attempts add retrieval time, and the widest permitted search may return more weak candidates. A parallel fan-out reduces waiting but spends query capacity even when the first path would have succeeded. Your mileage may vary because the right balance depends on corpus shape, update frequency, and the observed distribution of failure reasons.

I would benchmark those choices with a fixed question set, but I wouldn't publish a made-up winning threshold. Record the candidate count, selected stage, elapsed time, evidence score, abstention, and source identifiers for every run. Then replay questions after changes to chunking, normalization, or ranking. The key comparison is not raw hit count; it is the rate at which the system finds relevant, in-scope evidence before reaching an expensive stage, alongside the rate of unsupported answers that escape the gate.

Keep the index boring.

The smallest implementation I would ship

The retrieval adapter should expose one generic operation and accept explicit filters. That keeps the fallback policy in application code, where it can be tested, instead of scattering it across provider configuration. The following TypeScript is deliberately small. It assumes the adapter returns normalized candidates, regardless of whether the underlying search is lexical, dense, or hybrid.

type Scope = { courseId: string; lessonId?: string; publishedOnly: true; allowedAudience: string; }; type Candidate = { id: string; sourceId: string; text: string; evidenceScore: number; }; type SearchResult = { candidates: Candidate[]; elapsedMs: number; }; interface Retriever { search(query: string, scope: Scope, limit: number): Promise<SearchResult>; } type RetrievalDecision = | { kind: "grounded"; stage: string; candidates: Candidate[] } | { kind: "abstain"; reason: "NO_ACCEPTABLE_EVIDENCE" }; const normalizeQuery = (query: string): string => query.trim().replace(/\s+/g, " "); export async function retrieveForTutor( retriever: Retriever, query: string, scope: Scope, minimumEvidence: number, ): Promise<RetrievalDecision> { const stages: Array<{ name: string; query: string; scope: Scope }> = [ { name: "lesson", query, scope }, { name: "course", query, scope: { ...scope, lessonId: undefined }, }, { name: "normalized-course", query: normalizeQuery(query), scope: { ...scope, lessonId: undefined }, }, ]; for (const stage of stages) { const result = await retriever.search(stage.query, stage.scope, 8); const accepted = result.candidates.filter( (candidate) => candidate.evidenceScore >= minimumEvidence, ); if (accepted.length > 0) { return { kind: "grounded", stage: stage.name, candidates: accepted }; } } return { kind: "abstain", reason: "NO_ACCEPTABLE_EVIDENCE" }; } 

The number 8 is a configuration choice in this example, not a universal optimum. The same is true of minimumEvidence. I'm not sure either value is defensible for a real corpus until labeled course questions are replayed against it. The interface makes that uncertainty explicit: thresholds arrive as inputs, candidates retain source IDs, and the caller receives either grounded evidence or a typed abstention.

There is one subtle trap in the sample. Normalizing whitespace alone may produce the same query, so the third stage can duplicate the second. In production, I would only enable a normalization stage when it makes a deterministic, test-covered change, such as mapping an approved course glossary term. Otherwise, skip it. Config bloat starts with switches that don't alter behavior.

The generator should never receive rejected candidates. Give it the accepted passages, their source identifiers, and an instruction to answer only from that context. If the decision is abstain, render a stable response such as "I couldn't find enough course evidence for that question" and offer scoped actions: open the current lesson, rephrase the question, or ask an instructor. Don't smuggle a general model answer into the refusal path.

What I would change at scale

First, I would separate correctness metrics from operational metrics. Correctness needs labeled questions and source relevance judgments. Operations need stage frequency, index freshness, latency by stage, candidate counts, and abstention rates. A single success percentage hides too much. For example, a rising course-wide fallback rate can indicate that lesson metadata has drifted even while final answer coverage looks stable.

Second, I would add budgets to the state machine: a maximum number of stages, an overall deadline, and a cap on candidates passed to ranking. Timeouts should result in a recorded, typed decision; they should not authorize broader content access. Retries belong around transient transport operations and must remain bounded, while an empty but valid result should advance according to policy rather than being retried as if it were a network event.

Third, test the ugly cases. A deleted lesson, an unpublished module, duplicate transcript chunks, an acronym shared by two courses, and a question whose answer appears only in instructor material each exercise a different boundary. The test oracle should assert both what was returned and which scopes were never queried. I care about the second assertion more than most SDK examples do — negative behavior is part of the API.

This design is not suitable when every question legitimately requires corpus-wide synthesis; repeated narrow searches would add latency without buying meaningful isolation. In that case, use a single authorized corpus search plus ranking and evidence gating. It is also a poor fit for tiny, static course collections where a carefully assembled local index can be evaluated as one unit. Stick with the simpler path until telemetry shows a real recall or isolation problem.

For frequently updated, multi-course catalogs, bounded widening is the choice I would keep. It controls index duplication, makes the retrieval path observable, and gives the tutor an honest terminal state. The fallback is not "answer anyway." It is a disciplined way to search for evidence, then stop.

References