How hasanazeerkhan/ai-chatbot-testing works
This repository is an AI-chatbot testing framework: test scenarios exercise local LLM responses, with direct assertions for some behaviors and an LLM judge plus schema validation for answer quality. The graph preserves its documented functional, conversation, hallucination, safety, and injection coverage. Test-suite internals were not sampled, so their connections are limited to relationships documented in the README.
Main entry points: ollamaClient.js Ollama client · functional Functional tests · test-data Scenario data · hallucination Hallucination tests
Components 13
Test scenarios
- Functional tests
tests/functional - Conversation tests
tests/conversation - Hallucination tests
tests/hallucination - Safety tests
tests/safety - Injection tests
tests/prompt-injection - Scenario data
test-data
Chatbot runtime
- Chatbot entry
src/chatbot.js - Ollama client
src/clients/ollamaClient.js
Response evaluation
- LLM evaluator
src/evaluation/evaluator.js - Response parser
src/utils/responseParser.js - Evaluation schema
src/evaluation/schemas.js
Other components
- Test runner
- Ollama / Llama 3.2
Connections 19
- Test runner → Functional tests: runs
README.md - Test runner → Conversation tests: runs
README.md - Test runner → Hallucination tests: runs
README.md - Test runner → Safety tests: runs
README.md - Test runner → Injection tests: runs
README.md - Functional tests → Scenario data: uses scenarios
README.md - Hallucination tests → Scenario data: uses scenarios
README.md - Safety tests → Scenario data: uses scenarios
README.md - Injection tests → Scenario data: uses scenarios
README.md - Functional tests → Ollama client: requests response
README.md - Conversation tests → Ollama client: requests turns
README.md - Hallucination tests → Ollama client: requests response
README.md - Safety tests → Ollama client: requests response
README.md - Injection tests → Ollama client: requests response
README.md - Ollama client → Ollama / Llama 3.2: sends chat
src/clients/ollamaClient.js - Chatbot entry → Ollama / Llama 3.2: sends chat
src/chatbot.js - Functional tests → LLM evaluator: judges answer
README.md - LLM evaluator → Ollama / Llama 3.2: requests judgment
src/evaluation/evaluator.js - LLM evaluator → Evaluation schema: validates result
src/evaluation/evaluator.js