Introduction to GoMate
GoMate is an innovative and configurable modular Retrieval-Augmented Generation (RAG) framework designed to provide reliable input and trusted output. It ensures that users receive high-quality and dependable results in information retrieval and question-answering scenarios. The core design of the GoMate framework is its high configurability and modularity, allowing users to flexibly adjust and optimize various components according to specific needs, catering to diverse application scenarios.
GoMate Framework
GoMate distinguishes itself with its modular structure, which facilitates easy customization and integration into different systems. This adaptability makes GoMate an ideal choice for developers and researchers looking to implement reliable and efficient RAG solutions.
Key Features
- Reliable Input, Trusted Output: GoMate guarantees robust data input processes and credible output results.
- Ease of Installation: Available for installation through pip or directly from the source.
- Supports Various File Types: The platform supports multiple document formats including text, docx, ppt, excel, html, pdf, and markdown, ensuring versatility in handling different data sources.
- Enhanced Retrieval System: Integration of various retriever modules like
DenseRetriever
andBM25Retriever
, which support efficient index building, incremental updates, and index persistence. - Advanced Ranking and Generation Capabilities: Includes modules for ranking (
BgeReranker
), rewriting, summarization (Refiner
), and document selection (Judger
). - Comprehensive Documentation and Support: Provides extensive documentation and support resources to assist in implementation and troubleshooting.
Getting Started
Installation
GoMate can be installed either via pip or from the source code. Here’s a quick guide:
-
Method 1: Install via pip
- Create a conda environment:
conda create -n gomate python=3.9 conda activate gomate
- Install using pip:
pip install gomate
- Create a conda environment:
-
Method 2: Install from source
- Clone the repository:
git clone https://github.com/gomate-community/GoMate.git
- Install dependencies:
pip install -e .
- Clone the repository:
Using GoMate
Module Overview
GoMate consists of several modules that handle different aspects of the RAG process:
- Citation: Manages answer and evidence citation.
- Document: Handles document parsing and segmentation.
- Generator: Responsible for generation tasks.
- Judger: Facilitates document selection.
- Prompt: Assists with prompt management.
- Refiner: Summarizes information.
- ReRanker: Sorts retrieved results.
- Retrieval: Manages the retrieval process.
- Rewriter: Modifies and refines text outputs.
Building a Custom RAG Application
GoMate allows the creation of custom RAG applications by leveraging its modular structure. Developers can integrate different modules to tailor solutions to their specific requirements. Below is a simplified setup for a RAG application using GoMate:
from gomate.modules.document.common_parser import CommonParser
from gomate.modules.generator.llm import GLMChat
from gomate.modules.reranker.bge_reranker import BgeReranker
from gomate.modules.retrieval.dense_retriever import DenseRetriever
class RagApplication():
def __init__(self, config):
pass
def init_vector_store(self):
pass
def load_vector_store(self):
pass
def add_document(self, file_path):
pass
def chat(self, question: str = '', topk: int = 5):
pass
Explore RAG Capabilities
To experience the full potential of GoMate, users can configure local models and access the demo through a browser:
- Run the application:
python app.py
- Access via the browser at 127.0.0.1:7860.
Research and Development Team
GoMate is developed by the GoMate
team from the Network Data Science and Technology Key Laboratory, led by researchers Guo Jiafeng and Fan Yixing.
Join the Community
The GoMate community encourages feedback, suggestions, and contributions. Engage with the team for collaborative opportunities and join the discussions via the contact information provided in the project's GitHub repository.
This comprehensive introduction to GoMate highlights its strengths in delivering reliable and versatile RAG solutions tailored to various user needs.