← All projects
GenAI foundations · LangChain
Culinary Advisor
A culinary assistant built with LangChain Expression Language, OpenAI and Streamlit, used to learn guardrails and interface design.
01What it is
Check the request before spending on the answer.
- 01A two-tier gatekeeperA small upstream classifier checks the cuisine of the request at zero temperature, in around twenty tokens, before the main model is called.
- 02Stop earlyOn a cuisine mismatch the heavier generation is skipped and a dismissible warning is shown.
- 03A top-feed interfaceThe input sits at the top and the active answer streams directly beneath it, so nobody scrolls past old output.
02How it works
The gatekeeper pattern.
- User request
- Classifier chainCheap and deterministic
- Mismatch? Stop and warn
- Generation chain
- Streamed answer
03Where it stands
A foundations exercise.
It relies on the model’s own knowledge, and its README notes the limits of that pattern: it can state obscure facts wrongly and has no access to private data.
Practice, labelled as practice.