← The Lab
// The Lab

RAG chatbots

Two chat assistants that answer from their own documents instead of making things up. One for the University of Rijeka, one for the R.S. Bonum accounting firm.

FAISSLangChainOpenAIFlaskTTS

Both bots work the same way. Their documents are split into chunks, each chunk is turned into an embedding, and the embeddings go into a FAISS index. When a question comes in, it’s embedded too, the closest chunks are pulled out, and the model answers using only those. The animation above is that step: the query finds its six nearest chunks.

UNIRI chatbot

I built this one during my internship at Ericsson Nikola Tesla. It answers questions about the University of Rijeka, mostly about FIDIT and FFRI for now. It’s made with the OpenAI API, LangChain and Flask, and it can listen and talk: speech to text for the question, text to speech for the answer.

R.S. Bonum chatbot

An assistant for the R.S. Bonum accounting firm, in Croatian. Its knowledge comes from the firm’s website and their booklets for entrepreneurs. It retrieves the six most relevant chunks for every question, can show which sources it used, and reads its answers out loud. The firm links to it from its website as “Emma bot”, and you can try it here.

Emma, the R.S. Bonum chatbotHer welcome screen, with a few questions to start from