netease-youdao/QAnything
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis
Logo

Question and Answer based on Anything

Github | English | 简体中文

Table of Contents
  • What is QAnything
    • Key features
    • Architecture
  • Getting Started
    • Prerequisites
    • Installation
  • Usage
    • API Document
  • WeChat Group
  • Support
  • License
  • Acknowledgements

GitHub

👉This document is not updated in time, it is recommended to follow this link to go to QAnything GitHub to learn more

What is QAnything?

Question and Answer based on Anything (QAnything) is a local knowledge base question-answering system designed to support a wide range of file formats and databases, allowing for offline installation and use.

With QAnything, you can simply drop any locally stored file of any format and receive accurate, fast, and reliable answers.

Currently supported formats include: PDF, Word (doc/docx), PPT, Markdown, Eml, TXT, Images (jpg, png, etc.), Web links and more formats coming soon…

Key features

  • Data Security, supports installation and usage with network cable unplugged throughout the process.
  • Cross-language QA support, freely switch between Chinese and English QA, regardless of the language of the document.
  • Supports massive data QA, two-stage retrieval ranking, solving the degradation problem of large-scale data retrieval; the more data, the better the performance.
  • High-performance production-grade system, directly deployable for enterprise applications.
  • User-friendly, no need for cumbersome configurations, one-click installation and deployment, ready to use.
  • Multi knowledge base QA Support selecting multiple knowledge bases for Q&A

Architecture

qanything_system

Why 2 stage retrieval?

In scenarios with a large volume of knowledge base data, the advantages of a two-stage approach are very clear. If only a first-stage embedding retrieval is used, there will be a problem of retrieval degradation as the data volume increases, as indicated by the green line in the following graph. However, after the second-stage reranking, there can be a stable increase in accuracy, the more data, the better the performance.

two stage retrievaal

QAnything uses the retrieval component BCEmbedding, which is distinguished for its bilingual and crosslingual proficiency. BCEmbedding excels in bridging Chinese and English linguistic gaps, which achieves

  • A high performence on Semantic Representation Evaluations in MTEB;
  • A new benchmark in the realm of RAG Evaluations in LlamaIndex.

1st Retrieval(embedding)

ModelRetrievalSTSPairClassificationClassificationRerankingClusteringAvg
bge-base-en-v1.537.1455.0675.4559.7343.0537.7447.20
bge-base-zh-v1.547.6063.7277.4063.3854.8532.5653.60
bge-large-en-v1.537.1554.0975.0059.2442.6837.3246.82
bge-large-zh-v1.547.5464.7379.1464.1955.8833.2654.21
jina-embeddings-v2-base-en31.5854.2874.8458.4241.1634.6744.29
m3e-base46.2963.9371.8464.0852.3837.8453.54
m3e-large34.8559.7467.6960.0748.9931.6246.78
bce-embedding-base_v157.6065.7374.9669.0057.2938.9559.43
  • More evaluation details please check Embedding Models Evaluation Summary。

2nd Retrieval(rerank)

ModelRerankingAvg
bge-reranker-base57.7857.78
bge-reranker-large59.6959.69
bce-reranker-base_v160.0660.06
  • More evaluation details please check Reranker Models Evaluation Summary

RAG Evaluations in LlamaIndex(embedding and rerank)

rag evaluation in llamaindex

NOTE:

  • In WithoutReranker setting, our bce-embedding-base_v1 outperforms all the other embedding models.
  • With fixing the embedding model, our bce-reranker-base_v1 achieves the best performence.
  • The combination of bce-embedding-base_v1 and bce-reranker-base_v1 is SOTA.
  • If you want to use embedding and rerank separately, please refer to BCEmbedding

LLM

The open source version of QAnything is based on QwenLM and has been fine-tuned on a large number of professional question-answering datasets. It greatly enhances the ability of question-answering. If you need to use it for commercial purposes, please follow the license of QwenLM. For more details, please refer to: QwenLM

Getting Started

👉try QAnything online

Prerequisites

Required itemMinimum RequirementNote
NVIDIA GPU Memory>= 16GBNVIDIA 3090 recommended
NVIDIA Driver Version>= 525.105.17
CUDA Version>= 12.0
docker compose version>=1.27.4docker compose install

Installation

Please refer to: https://github.com/netease-youdao/QAnything?tab=readme-ov-file#installation

Usage

Cross-lingual: Multiple English paper Q&A

Information extraction

Various files

Web Q&A

API Document

If you need to access the API, please refer to the QAnything API documentation.

WeChat Group

Welcome to scan the QR code below and join the WeChat group.

Support

Reach out to the maintainer at one of the following places:

  • Github issues
  • Contact options listed on this GitHub profile

License

QAnything is licensed under Apache 2.0 License

Acknowledgments

QAnything adopts dependencies from the following:

  • Thanks to our BCEmbedding for the excellent embedding and rerank model.
  • Thanks to Qwen for strong base language models.
  • Thanks to Triton Inference Server for providing great open source inference serving.
  • Thanks to FasterTransformer for highly optimized LLM inference backend.
  • Thanks to Langchain for the wonderful llm application framework.
  • Thanks to Langchain-Chatchat for the inspiration provided on local knowledge base Q&A.
  • Thanks to Milvus for the excellent semantic search library.
  • Thanks to PaddleOCR for its ease-to-use OCR library.
  • Thanks to Sanic for the powerful web service framework.