How it works
Three versions of the same idea, each fixing what the previous one got wrong.
2024, version 1: string matching
ChatterBot's "best match" returned the stored answer whose question looked most like yours, letter by letter. It missed anything worded differently.
2024, version 2: a fine-tuned language model
microsoft/DialoGPT-small (124M parameters) fine-tuned with Hugging Face Transformers and PyTorch. A bug in the training data format meant it learned the vocabulary of PSU programs, not how to answer: the question and the answer were tokenized separately and lined up word by word, instead of being one sequence with the loss on the answer only.
2026, version 3: retrieval first, the model fixed and measured
Answers come from retrieval. Your question and the 82 written questions are turned into embeddings with all-MiniLM-L6-v2, and the closest one wins, with the university's name removed first (it made unrelated questions look alike). Below a similarity of 0.56, the bot says it doesn't know instead of guessing. That cut-off was chosen on a separate dev set.
The fine-tuned model was retrained the right way: one sequence per pair, question, end marker, then answer, with the loss on the answer only. It trained on 268 examples; early stopping kept epoch 4 of 7 (validation loss 0.6259). It runs on demand on this 1-CPU server with:
max_new_tokens=72
num_beams=3
early_stopping=True
no_repeat_ngram_size=3
repetition_penalty=1.2
Eval
76 test questions the models never saw: new wordings, typos, programs the data doesn't cover, and off-topic questions (41 more were used only to choose settings).
| System | Right answer* | Says "don't know" when it should | Invented links |
| Retrieval by meaning (served) | 82.0% | 73.3% | 0.0% |
| Retrieval by word overlap | 57.4% | 60.0% | 0.0% |
| Fine-tuned model, 2026 retrain | 45.5% | 0.0% | 56.6% |
| Fine-tuned model, 2024 | 0.0% | 0.0% | 0.0% |
For a fixed FAQ like this one, retrieval is the better tool: it's instant, it never invents a link, and it can say "I don't know". The model shows what fine-tuning learns, and where it falls short.
Limits
The data only covers programs from A to C (the 2024 scrape stopped there) and some general questions. A real PSU program like Graphic Design gets "I don't know".
Code, data and eval on GitHub ·
santiagomorel.dev