In the second workshop, each person builds a bot that answers from their own documents, cites which one it used, and admits when something is not there. No database to install. We ran the notebook end to end, and this is what happened.

The question is about Café La Espiga, a coffee shop invented for the workshop. The model never read anything about it. Sometimes it makes up an answer with full confidence. This time it admitted it did not know and suggested checking Google Maps.

The corpus is four documents from the coffee shop: menu, payments and invoicing, FAQ, branches and hours. Each one is cut into chunks of up to 500 characters, without splitting paragraphs. Every chunk keeps the name of its document. That name is the citation.

An embedding turns a sentence into a list of numbers, a vector. This model uses 2,048 numbers per sentence. Sentences that say the same thing land close together, even with different words.
"Can I bring my dog?" landed close to the sentence about pets, at 0.37. It landed far from the price of a latte, at 0.06, and from the Coyoacán hours, at 0.04. No sentence says "dog".

This model tells questions apart from documents. The question is embedded as query and the chunks as passage. The score ranks results; it is not an absolute grade.
The index keeps three things per chunk: its text, its source and its vector. It is computed once. Searching means comparing the question's vector against every chunk and keeping the three closest.


The three chunks are placed in front of the model, each with its source. It is an open-book exam. The rules go in the system prompt: answer only from the context, cite in brackets and, if it is not there, say so.
The same question the model could not answer in step 2 now comes out right, with its citation.
![Answer: the Coyoacán branch closes on Mondays. [sucursales-horarios.md]](blog/labs-02/paso-08.png)
"Do you sell pizza?" is in no document. The search still returns three chunks, with low scores: 0.19, 0.18 and 0.17. The model reads them and answers "I cannot find that in the documents."

menu-precios.md, because the rule tells it to always cite.No score threshold separates what is there from what is not. The model decides, by reading. And prompt rules are followed to the letter: ask it to always cite, and it cites even when it found nothing.
You paste your own text or upload a .txt file. It joins the documents and the index is rebuilt. No other step changes. The example uses the description of this workshop series.

[mi-documento].The chat combines the memory from part one with this part's search. On each turn it finds three chunks and answers from them. Both answers were right: Roma opens at 8:00 and Coyoacán is the one closed on Mondays.

The search only reads your last message. If you write "And on Sundays?", it does not know which branch you mean. Solving that properly means rewriting the question with the history, and that is already an agent's job.