Personal site · Q&A
The site Q&A, taken apart
Behind the Q&A window sits a small RAG. This graph breaks it into nodes: the six steps of the flow, the functions each step uses, and the topics and passages of the knowledge base. Select any node to read its description, source code or passage text.
Drag nodes or the background, scroll to zoom; select a node to read it
The graph needs JavaScript. The lists below cover the same steps, functions and topics.
Flow and codeSix steps and the functions behind each
-
Code first blocks explicit requests for secrets or attempts to rewrite the rules, and redacts emails, phone numbers and keys. Plain greetings and plain contact questions are answered directly, with no model call.
- Function
- Function
- Function
-
The R in RAG. The question is split into Latin words and CJK bigrams and matched against the public passages, with section keywords, project aliases and conversation context added in. The 10 highest-scoring passages become candidates. No vector database.
- Function
- Function
- Function
- Constant
-
The question and the candidates go to Jev in one request: intent, topic, whether an unrelated request is mixed in, and whether each passage directly answers the question. Jev returns only classifications and probabilities, never text; a malformed response is discarded entirely.
- Function
- Function
- Function
- Constant
-
Code decides from the probabilities and fixed thresholds: quote passages, give contact details, decline, or state that the public material is not enough. Once the topic is settled, only passages from that topic are quoted; a second look at the topic happens when needed.
- Function
- Constant
-
Every reply is page text plus a source link; nothing is generated freely. Suggested questions point to passages of the same topic that have not been quoted yet, and picking one returns that passage with no model call.
- Function
- Function
-
When Jev is unavailable, the quota is used up or the response is malformed, the answer relies on retrieval scores alone and the reply is labelled as such. The thresholds are conservative: stating that the material is not enough is preferred.
- Function
- Constant
Knowledge baseThe Q&A only quotes these passages
Generated from the page content at build time: every section of each project page and the About page is one passage with a fixed anchor. The Q&A only ever quotes this text.
- DAOS Sport 5-system overview 11 passages
- Tutoring Course System 9 passages
- Summer Course Registration Platform 6 passages
- Cross-Venue Workforce Scheduling System 9 passages
- Pool Co-Teaching Scheduling System 7 passages
- LINE OA BOT 7 passages
- ioredis 6 passages
- WorldMonitor 4 passages
- What The Hair 4 passages
- This site 11 passages
- About 12 passages