The travel assistant may answer only if the index supplies a matching source (R-02, R-05). Lesson 2.2 wrote a retrieval for this but left the vector query open and called the field names title, chunk, source_url and the configuration reise-semantik placeholders. This lesson fixes them and completes the query.

Prior knowledge. Embeddings and vector stores are in "AI track, lessons T4.1 to T4.4", hybrid search with Reciprocal Rank Fusion and the overview of semantic ranking in "T5.4", measuring hits with a test set in "T9". Foreign text as fenced-in data and the hard rule "no hit, no answer" hold as in 2.2 (R-11).

New in this lesson (changes no R number). The index carries the vector profile profil-embed (algorithm hnsw), the vectorizer vec-embed on the deployment embed and the semantic configuration reise-semantik. The number of dimensions comes from the configuration, not from the code (R-08: the model behind embed is named there).

The requirement

All numbers are assumptions of the task.

No. Requirement Type Measure Weight Source
5.2-01 Identifiers and technical terms ("Fare N-17") are found literally. Q hit among the first 5 in 90 % of the test set's cases Must R-10
5.2-02 Paraphrased questions find the same source. Q as 5.2-01 Must R-10
5.2-03 Questions in German, English and Danish find their source. F 3 languages Must R-01
5.2-04 Without a good enough source the assistant does not answer. R threshold in the code Must R-02
5.2-05 The query needs no key. R 0 keys Must R-07
5.2-06 Semantic ranking runs only where it measurably helps. Q comparison on the test set Should R-09