Skip to main content

Production RAG: what I learned from processing 5M+ documents

·672 words·4 mins
Corso AI
Articoli Interessanti - This article is part of a series.
Part : Everything as Code: How We Manage Our Company In One Monorepo At Kasava, we've embraced the concept of "everything as code" to streamline our operations and ensure consistency across our projects. This approach allows us to manage our entire company within a single monorepo, providing a unified source of truth for all our configurations, infrastructure, and applications. **Why a Monorepo?** A monorepo offers several advantages: 1. **Unified Configuration**: All our settings, from development environments to production, are stored in one place. This makes it easier to maintain consistency and reduces the risk of configuration drift. 2. **Simplified Dependency Management**: With all our code in one repository, managing dependencies becomes more straightforward. We can easily track which versions of libraries and tools are being used across different projects. 3. **Enhanced Collaboration**: A single repository fosters better collaboration among team members. Everyone has access to the same codebase, making it easier to share knowledge and work together on projects. 4. **Consistent Build and Deployment Processes**: By standardizing our build and deployment processes, we ensure that all our applications follow the same best practices. This leads to more reliable and predictable deployments. **Our Monorepo Structure** Our monorepo is organized into several key directories: - **/config**: Contains all configuration files for various environments, including development, staging, and production. - **/infrastructure**: Houses the infrastructure as code (IaC) scripts for provisioning and managing our cloud resources. - **/apps**: Includes all our applications, both internal tools and customer-facing products. - **/lib**: Stores reusable libraries and modules that can be shared across different projects. - **/scripts**: Contains utility scripts for automating various tasks, such as data migrations and backups. **Tools and Technologies** To manage our monorepo effectively, we use a combination of tools and technologies: - **Version Control**: Git is our primary version control system, and we use GitHub for hosting our repositories. - **Continuous Integration/Continuous Deployment (CI/CD)**: We employ Jenkins for automating our build, test, and deployment processes. - **Infrastructure as Code (IaC)**: Terraform is our tool of choice for managing cloud infrastructure. - **Configuration Management**: Ansible is used for configuring and managing our servers and applications. - **Monitoring and Logging**: We use Prometheus and Grafana for monitoring,
Part : This Article
Default featured image
#### Source

Type: Web Article Original link: https://blog.abdellatif.io/production-rag-processing-5m-documents Publication date: 2025-10-20


Summary
#

WHAT - This article discusses the lessons learned in developing RAG (Retrieval-Augmented Generation) systems for Usul AI and corporate clients, processing over 13 million pages.

WHY - It is relevant to the AI business because it offers practical insights into improving the effectiveness of RAG systems, identifying strategies that have truly worked and those that have wasted time.

WHO - The main players are Usul AI, corporate clients, and the developer community using tools like Langchain and Llamaindex.

WHERE - It is positioned in the market for AI solutions for managing and processing large volumes of documents, with a focus on RAG systems.

WHEN - The content is dated October 20, 2025, indicating an advanced level of maturity and based on recent experiences.

BUSINESS IMPACT:

  • Opportunities: Implementing query generation, reranking, and chunking strategies to improve the accuracy of RAG systems.
  • Risks: Competitors adopting the same strategies can reduce the competitive advantage.
  • Integration: Possible integration with the existing stack to improve document management and response generation.

TECHNICAL SUMMARY:

  • Core technology stack: Langchain, Llamaindex, Azure, Pinecone, Turbopuffer, Unstructured.io, Cohere, Zerank, GPT.
  • Scalability: The system was tested on over 13 million pages, demonstrating scalability.
  • Technical differentiators: Use of parallel query generation, advanced reranking, custom chunking, and metadata integration to improve the context of responses.

WHAT - Langchain is a library for developing AI applications that facilitates the integration of language models and natural language processing tools.

WHY - It is relevant to the AI business because it allows for the rapid creation of working prototypes and the integration of advanced language models into business applications.

WHO - The main players are the AI developer community and companies using Langchain to develop AI solutions.

WHERE - It is positioned in the market for libraries for developing AI applications, facilitating the integration of language models.

WHEN - Langchain is a consolidated tool, widely used in the AI community.

BUSINESS IMPACT:

  • Opportunities: Accelerate the development of AI applications by integrating advanced language models.
  • Risks: Dependence on an external library can involve compatibility and update risks.
  • Integration: Easy integration with the existing stack for AI application development.

TECHNICAL SUMMARY:

  • Core technology stack: Python, language models like GPT, machine learning frameworks.
  • Scalability: High scalability, supports the integration of large language models.
  • Technical differentiators: Ease of integration, support for advanced language models, active community.

WHAT - Llamaindex is a library for indexing and searching documents using advanced language models.

WHY - It is relevant to the AI business because it allows for improving the precision and efficiency of searches on large volumes of documents.

WHO - The main players are the AI developer community and companies using Llamaindex to improve document search.

WHERE - It is positioned in the market for document indexing and search solutions, using advanced language models.

WHEN - Llamaindex is a consolidated tool, widely used in the AI community.

BUSINESS IMPACT:

  • Opportunities: Improve the precision and efficiency of searches on large volumes of documents.
  • Risks: Dependence on an external library can involve compatibility and update risks.
  • Integration: Easy integration with the existing stack for document search.

TECHNICAL SUMMARY:

  • Core technology stack: Python, language models like GPT, machine learning frameworks.
  • Scalability: High scalability, supports the indexing of large volumes of documents.
  • Technical differentiators: Precision in search, support for advanced language models, active community.

Use Cases
#

  • Private AI Stack: Integration into proprietary pipelines
  • Client Solutions: Implementation for client projects
  • Strategic Intelligence: Input for technological roadmap
  • Competitive Analysis: Monitoring AI ecosystem

Resources
#

Original Links #


Article recommended and selected by the Human Technology eXcellence team, processed through artificial intelligence (in this case with LLM HTX-EU-Mistral3.1Small) on 2025-10-23 13:58 Original source: https://blog.abdellatif.io/production-rag-processing-5m-documents

Related Articles #

Articoli Interessanti - This article is part of a series.
Part : Everything as Code: How We Manage Our Company In One Monorepo At Kasava, we've embraced the concept of "everything as code" to streamline our operations and ensure consistency across our projects. This approach allows us to manage our entire company within a single monorepo, providing a unified source of truth for all our configurations, infrastructure, and applications. **Why a Monorepo?** A monorepo offers several advantages: 1. **Unified Configuration**: All our settings, from development environments to production, are stored in one place. This makes it easier to maintain consistency and reduces the risk of configuration drift. 2. **Simplified Dependency Management**: With all our code in one repository, managing dependencies becomes more straightforward. We can easily track which versions of libraries and tools are being used across different projects. 3. **Enhanced Collaboration**: A single repository fosters better collaboration among team members. Everyone has access to the same codebase, making it easier to share knowledge and work together on projects. 4. **Consistent Build and Deployment Processes**: By standardizing our build and deployment processes, we ensure that all our applications follow the same best practices. This leads to more reliable and predictable deployments. **Our Monorepo Structure** Our monorepo is organized into several key directories: - **/config**: Contains all configuration files for various environments, including development, staging, and production. - **/infrastructure**: Houses the infrastructure as code (IaC) scripts for provisioning and managing our cloud resources. - **/apps**: Includes all our applications, both internal tools and customer-facing products. - **/lib**: Stores reusable libraries and modules that can be shared across different projects. - **/scripts**: Contains utility scripts for automating various tasks, such as data migrations and backups. **Tools and Technologies** To manage our monorepo effectively, we use a combination of tools and technologies: - **Version Control**: Git is our primary version control system, and we use GitHub for hosting our repositories. - **Continuous Integration/Continuous Deployment (CI/CD)**: We employ Jenkins for automating our build, test, and deployment processes. - **Infrastructure as Code (IaC)**: Terraform is our tool of choice for managing cloud infrastructure. - **Configuration Management**: Ansible is used for configuring and managing our servers and applications. - **Monitoring and Logging**: We use Prometheus and Grafana for monitoring,
Part : This Article