Ask about delivery
An answer with expandable source references.
AI Chatbots / Archived implementation
A support assistant that makes its evidence visible, keeps unknowns honest, and gives people a clear way forward.
Read the project statusArchived project
The hosted AI service has been retired to keep server resources available for other applications. This case study documents the previous implementation; screenshots and technical descriptions below are historical. No chat messages can be submitted here.
Contact MiladThe challenge
A confident answer is not always a correct answer. Visitors need quick policy help, while support teams need to know which document supports a response. An assistant that guesses can make a small question harder to resolve.
Make the source library editable and inspectable. Retrieve relevant passages, generate a direct answer, show its citations and let the visitor follow up, compare policies or draft a reply.
Previously built: a working self-hosted AI application with session-only document editing, text-file imports, source retrieval, contextual questions and reviewable exports. The sample businesses are fictional. It is not connected to a live store or CRM.
Interface decisions
Sourcewise uses a blue-and-white reading space, a book-inspired wordmark and a left-hand library. Rounded controls keep document exploration approachable; evidence stays alongside the conversation.

Implementation
Every answer follows an inspectable path. A local retrieval layer selects passages. A private language model writes the response. The interface distinguishes generated answers from the browser-only fallback.
Start with ten fictional shop records, edit them or import .txt and .md files. Added documents remain in browser memory. Each record has a stable reference ID; relevant chunks are selected from longer documents.
Lexical passage ranking favours question terms, source titles and the previous answer’s references. Up to four relevant passages and the last two exchanges are supplied to the model. This is bounded text retrieval, not vector search. The sample shipping threshold uses deterministic arithmetic and is labelled as a calculation.
A self-hosted Qwen model served by llama.cpp writes an answer in English or German. A same-origin PHP endpoint limits request size, concurrency and usage. Source text is untrusted input, and no tools or external actions are available.
Open citations, edit a source, ask a follow-up or export a conversation with its evidence. AI can misinterpret a passage or omit a citation. Uncited answers are visibly marked. A local source-only mode remains available if the model is busy.
Test the boundaries
Run 12 built-in scenarios covering supported questions, unknown orders, policy exceptions and read-only limits. The automatic test panel checks the local retrieval fallback, not AI accuracy. Each scenario can also be tried against the model for manual review. Check factual support, missing information, language quality and whether suggested actions are clearly labelled.
An answer with expandable source references.
A clear fallback; no fabricated record.
The demo refuses credential requests.
Previous messages disappear.
A reviewable draft with source references appears; copy or download it without sending anything.
Cost & potential impact
Live inference is now disabled. The previous implementation had €0 in external model/API fees and used the existing VPS, with a three-CPU limit, a 3.5 GiB memory cap and one generation at a time. Hosting, maintenance and server capacity still have a cost. Usage limits keep the public demo within its shared resources.
If 100 routine questions each take 3 minutes manually and 1 minute to verify with this tool, the gross opportunity is 200 minutes (3 hours 20 minutes). This is an assumption, not a measured outcome. Setup, maintenance, unanswered questions and review reduce any net saving.
Document editing, retrieval, self-hosted generation, follow-up conversation and evidence export work together in a real application. Sample checks do not prove production accuracy or business outcomes. The small CPU model can be slow or make mistakes; visitors can stop a response, inspect sources or use the local fallback. Language selection changes the generated answer; source records retain their original language.
From prototype to production
Test real, consented questions with users. Measure useful answers, missed intents and time spent verifying. Expand the approved sources.
Add a reviewed document-ingestion pipeline, versioning and authenticated retrieval. Add access control and reviewed source updates before connecting real business records.
Extend the evaluation set, measure useful answers and verification time, and add consented monitoring and a reviewed handoff integration. Require explicit approval for external actions.