Ask questions across approved text documents and receive answers with visible source references. Project 05 in the Jamil Darwish Automation Lab.
View in Jamil Darwish's portfolio · MIT License
- Demo: deterministic retrieval finds matching passages locally and refuses unsupported answers.
- AI: your model synthesizes an answer from the current document library through a private local proxy.
Requires Node.js 22+.
git clone https://github.com/Jamilof1/knowledge-chatbot.git
cd knowledge-chatbot
npm install
npm run devFor AI mode, copy .env.example to .env, add AI_API_KEY, and restart. PowerShell: Copy-Item .env.example .env.
The default uses the OpenAI Responses API and AI_MODEL=gpt-5. For an OpenAI-compatible chat API, set its AI_BASE_URL, model name, and AI_API_STYLE=chat. Secrets remain server-side and .env is ignored.
- Built-in FAQ library plus local
.txtand.mdselection. - Local passage matching, confidence, no-answer behavior, and citations.
- Optional grounded AI answer from the current documents/conversation.
- Responsive chat room without accounts, tracking, or persistent storage.
npm run dev starts client + API, npm test runs retrieval tests, npm run build creates dist/, and npm start serves it.
Demo document selection stays in the browser. Selecting the AI action sends the current library and chat state to your configured provider. Use only documents you are authorized to process, review citations, and do not treat a generated answer as evidence without checking the source.
MIT — built by Jamil Darwish.
