BUILD 04 / OPEN SOURCE
Offline-Support-ChatBot.
Offline-Support-ChatBot
// an experiment in possibility
OPEN SOURCE / EXPERIMENT 04const idea = await
build("Offline-Support-ChatBot");
ready for what's next
THE IDEA & THE BUILDFrom concept
From concept
to something real.
This project demonstrates how to build an offline AI-powered customer support chatbot using Ollama and the Llama 3.2 (3B) language model. The chatbot answers common e-commerce support queries such as order tracking, returns, payments, and account management. Unlike cloud-based AI services, this system runs entirely locally, ensuring that no customer data leaves the machine. The project also evaluates zero-shot and one-shot prompt engineering techniques.
THE QUICK TOUR
A closer look, in three steps.
Preview the project, understand the idea, then explore the product or source.
FROM THE REPOSITORY / README.mdOpen the source notes
# Offline Customer Support Chatbot (Ollama + Llama 3.2) ## Overview This project demonstrates how to build an **offline AI-powered customer support chatbot** using **Ollama** and the **Llama 3.2 (3B)** language model. The chatbot answers common e-commerce support queries such as order tracking, returns, payments, and account management. Unlike cloud-based AI services, this system runs entirely **locally**, ensuring that no customer data leaves the machine. This approach improves **privacy, security, and cost efficiency** by eliminating external API usage. The project also evaluates two prompt engineering techniques: * **Zero-Shot Prompting** * **One-Shot Prompting** The responses generated by the model are logged and manually evaluated based on relevance, coherence, and helpfulness. --- ## Project Structure ``` offline-support-chatbot │ ├── prompts │ ├── zero_shot_template.txt │ └── one_shot_template.txt │ ├── eval │ └── results.md │ ├── chatbot.js ├── setup.md ├── report.md └── README.md ``` ### Description of Components **chatbot.js** Node.js script that sends prompts to the Ollama API and retrieves responses from the Llama 3.2 model. **prompts/** Contains the prompt templates used for zero-shot and one-shot prompting. **eval/results.md** Stores generated responses and manual evaluation scores. **report.md** Detailed analysis comparing the performance of different prompting strategies. **setup.md** Instructions for installing dependencies and running the project. --- ## Features * Fully **offline AI chatbot** * Uses **Ollama local LLM runtime** * Powered by **Llama 3.2 (3B)** * Implements **prompt engineering experiments** * Evaluates responses using **manual scoring metrics** * Generates structured evaluation logs in Markdown --- ## Technologies Used * **Node.js** * **Ollama** * **Llama 3.2** * **Axios (HTTP requests)** * **Markdown for evaluation logs** --- ## Example Customer Queries The chatbot processes realistic e-commerce support questions such as: * How can I track the shipping status of my order? * My discount code is not working at checkout. * I received a damaged product. How can I request a replacement? * How can I reset my account password? Each query is processed twice using different prompt strategies. --- ## Evaluation Metrics Responses are evaluated using the following criteria: **Relevance (1–5)** How well the response addresses the customer query. **Coherence (1–5)** Clarity, grammar, and readability. **Helpfulness (1–5)** Whether the response provides actionable guidance. --- ## Results The experiment showed that **one-shot prompting generally produces more structured and helpful responses compared to zero-shot prompting**. Full evaluation logs are available in: ``` eval/results.md ``` --- ## Conclusion This project demonstrates the feasibility of building **offline AI customer support systems** using locally deployed language models. By combining Ollama with prompt engineering techniques, developers can create privacy-preserving AI tools without relying on external APIs. Future improvements could include integrating product databases, retrieval-based knowledge systems, and a web-based user interface.Continue on GitHub