Skip to content

Repository files navigation

Index — Knowledge Chatbot

Ask questions across approved text documents and receive answers with visible source references. Project 05 in the Jamil Darwish Automation Lab.

Verify View in Jamil Darwish's portfolio · MIT License

Knowledge Chatbot interface

Modes

  • 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.

Quick start

Requires Node.js 22+.

git clone https://github.com/Jamilof1/knowledge-chatbot.git
cd knowledge-chatbot
npm install
npm run dev

For AI mode, copy .env.example to .env, add AI_API_KEY, and restart. PowerShell: Copy-Item .env.example .env.

Provider configuration

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.

Features

  • Built-in FAQ library plus local .txt and .md selection.
  • 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.

Commands

npm run dev starts client + API, npm test runs retrieval tests, npm run build creates dist/, and npm start serves it.

Privacy and limitations

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.

About

Source-grounded document chatbot starter with citations, configurable AI providers, and local-first setup.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages