Automating Access to Internal Knowledge and Business Processes Using RAG and a Telegram Bot

Discover how to automate internal knowledge access using RAG technology and Telegram bots. Learn how to streamline business processes and improve employee productivity.
By Andrei Gorlov
0 views๐งฉ 1. Why This Matters: The Problem We Solved
Growing companies with extensive internal documentation often face a common challenge: employees spend too much time searching for information or asking repetitive questions. This reduces productivity and increases the load on support teams.
Typical scenarios:
- A new employee can't find the contract template;
- A manager forgets how to issue an invoice;
- A developer is unsure who should review their code.
๐ ๏ธ 2. Solution Architecture Overview
Before diving into the details, here's an overview of our architecture, which includes:
- RAG (Retrieval-Augmented Generation) โ a hybrid AI approach combining retrieval and generation;
- Vector storage โ for semantically meaningful document retrieval;
- Telegram bot โ as the user interface for employees;
- Redmine API โ to automate task management and time tracking;
- GitLab โ as the living documentation source.

๐ง 3. Preparing the Knowledge Base and Vectorization
The company's internal knowledge was stored as .md files in GitLab. We:
- Automated document extraction;
- Cleaned and preprocessed the content;
- Vectorized the content using
sentence-transformers(Learn more); - Indexed the content in Elasticsearch.
๐ Vector Databases Overview
๐ค 4. Telegram Bot โ Employee Interface
Employees interact with the bot by asking questions directly in chats:
- "How do I log time for Project Alpha?"
- "Which NDA template should I use?"
If the bot is unsure of the answer, it forwards the question to a support channel.
๐ 5. Self-Learning and Answer Quality Management
Every unanswered question signals a documentation gap.
- We log "unanswered" queries;
- Manually review and tag them;
- Create or update documents;
- Re-index the knowledge base.
๐ RAG Quality Evaluation โ OpenAI Cookbook
๐งฑ 6. Redmine Integration
With Redmine API integration, employees can:
- View their assigned tasks;
- Log time directly via the bot;
- Generate invoices;
- Initiate contract preparation.
๐ Redmine API Docs
๐ฌ 7. Example Queries
Examples:
๐ง: How do I issue an invoice for March?
๐ค: Here's the instruction: [link]
๐ง: Who should review my pull request?
๐ค: Your team lead or a senior developer. More info: [link]
๐ 8. Outcomes and Scalability
Results:
- Reduced support load;
- Faster onboarding for new employees;
- Routine processes automated.
Scalability options:
- Integration with Slack, MS Teams;
- Multi-language support;
- Integration with other APIs (CRM, ERP, etc.).
Key Benefits of RAG-Based Knowledge Systems
- Improved productivity: Employees find information faster
- Reduced support load: Fewer repetitive questions to support teams
- Better onboarding: New employees can access knowledge instantly
- Process automation: Routine tasks handled automatically
- Continuous improvement: System learns from unanswered questions
Implementation Best Practices
- Start with high-value content: Focus on frequently accessed documents
- Regular updates: Keep knowledge base current and relevant
- Quality monitoring: Track answer accuracy and user satisfaction
- Integration planning: Connect with existing tools and workflows
- User training: Help employees understand how to use the system effectively
๐ค Want Similar Results?
If you'd like to automate your internal knowledge access and streamline business processes, get in touch with us. Let's build it together.
Related Articles:
- When Your Recruiter is an AI: Building a Smart Vacancy Parser with Telegram and LLMs - Another automation project using Telegram and AI
- How We Taught Our Website to Talk Back (and Why Clients Love It) - Building conversational AI for websites
- The Art of Taming AI Agents: Why Structure Beats Chaos in Development - Strategies for managing AI agents effectively
๐ Useful Links
- Haystack: RAG
- Sentence-Transformers
- Pinecone Guide
- RAG Evaluation
- Redmine API
- AI Agents Ecosystem Trends (Anchor: DesignRush) - Industry analysis by our partners at DesignRush