AI & Automation
Internal Knowledge Assistant
A RAG chatbot that answers employees’ questions from company records and scanned documents.
- Internship
- Diyar United Company
- My role
- AI Engineer Intern
- Period
- 2023
- Key result
- RAG + OCR answers grounded in internal documents
- Python
- RAG
- OCR
- LLM Integration
- Document Processing
Overview
During an internship at Diyar United Company, I developed an internal chatbot in Python. Employees ask a question in plain language, about employee information or internal documentation, and the assistant answers from the company’s own material.
It was built with retrieval-augmented generation: instead of relying on what a language model already knows, the assistant first finds the relevant passages in a knowledge base and then answers from them.
Problem and context
Useful internal information was spread across employee records and organizational documents. Finding an answer meant knowing which document held it and reading until you found the line.
Many of those documents were not searchable text at all, so a search box would not have helped. And a general-purpose language model knows nothing about one company’s people or policies, so its answers had to be tied to the source material.
My contributions
Designed and developed
My own work
- The Python chatbot and its question-answering flow.
- OCR processing to extract text from organizational documents.
- A searchable knowledge base combining employee records and company documents.
- Retrieval that supplies the relevant passages to a large language model for each question.
Done with the team
Shared work
- Developed as an intern, within the company’s team and on its internal data.
Technical architecture
From internal documents to an answer
Conceptual diagram
- 01
Sources
Employee records · documents
- 02
OCR
Text extracted from documents
- 03
Knowledge base
Searchable content
- 04
Retrieval
Passages relevant to the question
- 05
Answer
Written by an LLM from that context
- Ingestion
- Documents pass through OCR where needed, and the extracted text joins the employee records in one knowledge base.
- Retrieval
- For each question, the system searches the knowledge base for the passages most relevant to it.
- Generation
- The question and the retrieved passages go to a large language model, which writes an answer from that context.
Engineering challenges
Documents that were not text
- Challenge
- Much of the organizational material could not be searched or read by software, so it was invisible to any retrieval system.
- Approach
- I added an OCR step that extracts the text from documents before they enter the knowledge base.
- Technology
- Python
- OCR
- Document processing
- Outcome
- Document contents became available for the assistant to retrieve.
Answers about one specific company
- Challenge
- A language model on its own cannot know an organization’s employees or internal documentation, and will produce a plausible answer anyway.
- Approach
- Using retrieval-augmented generation, each question is answered from passages retrieved out of the company’s own records and documents, supplied to the model as context.
- Technology
- RAG
- Information retrieval
- Large language models
- Outcome
- Employees could ask natural-language questions and get answers based on internal sources.
Two kinds of source material
- Challenge
- Structured employee records and free-form documents are stored and read differently, but a person asking a question does not care which one holds the answer.
- Approach
- Both were integrated into a single searchable knowledge base, so one question can draw on either.
- Technology
- Python
- Knowledge base
- Data integration
- Outcome
- One interface answers questions about both people and documentation.
Results and impact
- Working internal chatbot for natural-language questions
- Document contents extracted and made retrievable
- Employee records and company documents in one knowledge base
Visuals
No product screenshots published
Internal company system. Screenshots are intentionally withheld; the diagram above is a conceptual view. The cover and the architecture diagram on this page are conceptual illustrations.