โ† Back to Resources
AI Automationยท31 May 2024ยท3 min read

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

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.

๐Ÿ“Œ RAG Explained (Haystack)

Architecture Diagram


๐Ÿง  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

  1. Start with high-value content: Focus on frequently accessed documents
  2. Regular updates: Keep knowledge base current and relevant
  3. Quality monitoring: Track answer accuracy and user satisfaction
  4. Integration planning: Connect with existing tools and workflows
  5. 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:


๐Ÿ“Ž Useful Links

IT grows

30 minutes ยท No commitment

From idea to AI-powered delivery in weeks, not months.

Let's discuss how AI and engineering can accelerate your business.

Automation, engineers, or both โ€” we'll recommend a clear path and respond within one business day.

Talk to an AI & Delivery Expert