QAnything README

The project's README from github.com/netease-youdao/QAnything. As one markdown file: README.md.

Logo

Question and Answer based on Anything

English | 简体中文

         

              

    

Table of Contents

🚀 Important Updates

Important things should be said three times.

[2024-08-23: QAnything updated to version 2.0.]

[2024-08-23: QAnything updated to version 2.0.]

[2024-08-23: QAnything updated to version 2.0.]

  • This update brings improvements in various aspects such as usability, resource consumption, search results, question and answer results, parsing results, front-end effects, service architecture, and usage methods.
  • At the same time, the old Docker version and Python version have been merged into a new unified version, using a single-line command with Docker Compose for one-click startup, ready to use out of the box.

Contributing

We appreciate your interest in contributing to our project. Whether you're fixing a bug, improving an existing feature, or adding something completely new, your contributions are welcome!

Thanks to all contributors for their efforts

Special thanks!

Please note: Our list of contributors is automatically updated, so your contributions may not appear immediately on this list.

Special thanks!:@ikun-moxiaofei

Special thanks!:@Ianarua

Business contact information:

010-82558901

For business cooperation, please contact us by phone or email:

What is QAnything?

QAnything(Question and Answer based on Anything) 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(pdf),Word(docx),PPT(pptx),XLS(xlsx),Markdown(md),Email(eml),TXT(txt),Image(jpg,jpeg,png),CSV(csv),Web links(html) and more formats coming soon…

Key features

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

1st Retrieval(embedding)

Model Retrieval STS PairClassification Classification Reranking Clustering Avg
bge-base-en-v1.5 37.14 55.06 75.45 59.73 43.05 37.74 47.20
bge-base-zh-v1.5 47.60 63.72 77.40 63.38 54.85 32.56 53.60
bge-large-en-v1.5 37.15 54.09 75.00 59.24 42.68 37.32 46.82
bge-large-zh-v1.5 47.54 64.73 79.14 64.19 55.88 33.26 54.21
jina-embeddings-v2-base-en 31.58 54.28 74.84 58.42 41.16 34.67 44.29
m3e-base 46.29 63.93 71.84 64.08 52.38 37.84 53.54
m3e-large 34.85 59.74 67.69 60.07 48.99 31.62 46.78
bce-embedding-base_v1 57.60 65.73 74.96 69.00 57.29 38.95 59.43

2nd Retrieval(rerank)

Model Reranking Avg
bge-reranker-base 57.78 57.78
bge-reranker-large 59.69 59.69
bce-reranker-base_v1 60.06 60.06

RAG Evaluations in LlamaIndex(embedding and rerank)

NOTE:

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

🚀 Latest Updates

Before You Start

Star us on GitHub, and be instantly notified for new release! star_us

Getting Started

Latest Features Table

features python (v1.4.2) docker (v1.2.2) QAnything v2.0.0 Explanation
Detailed installation document ✅ ✅ ✅
Support API ✅ ✅ ✅
Support production environment ❌ ✅ ✅
Support offline use ❌ ✅ ✅
Support multiple concurrency ❌ ✅ ✅
Support multi-card inference ❌ ✅ ❌ Version 2.0.0 no longer provides default local LLM. All access is through the openai interface, and users can deploy local LLM through tools such as ollama.
Support Mac (M series chips) ✅ ❌ ✅
Support Linux ✅ ✅ ✅ The old version of Python defaults to using onnxruntime-gpu for cuda12 on Linux, and automatically switches to onnxruntime when glibc<2.28.
Support windows ❌ ❌ ✅ Both old versions of Python and Docker require WSL environment. Version 2.0.0 can be started directly in a non-WSL environment.
Support CPU only ✅ ❌ ✅ Version 2.0.0 Mac, Linux, Win unified no longer use GPU, completely migrated to CPU.
Support hybrid search (BM25+embedding) ❌ ✅ ✅
Support web search (need VPN) ✅ ❌ ✅
Support FAQ ✅ ❌ ✅
Support BOT ✅ ❌ ✅
Support Traceability ✅ ❌ ✅
Support Log retrieval ✅ ❌ ✅
Support audio file ✅ ❌ ❌ Relying on whisper, slow speed and high resource consumption, temporarily removed.
Support OpenCloudOS ✅ ❌ ✅
Support interfaces compatible with Openaiapi (including ollama) ✅ ✅ ✅ Old versions of Python and Docker require manual modification of parameters such as api_key, base_url, model, etc. In version 2.0.0, these are all changed to be automatically saved in the front end settings.
PDF parsing performance improvement (including tables) ✅ ❌ ✅ Version 1.4.2 requires manual settings, version 2.0.0 does not require manual settings, and both the PDF parsing effect and performance have been improved.
User-defined configuration (Experimental: Improve speed) ✅ ❌ ✅ v1.4.2 needs to be set manually, v2.0.0 uses the best configuration by default.

QAnything (netease-youdao/QAnything)

Searching Database…

14.2K ·GitHub
What is this?A local knowledge base question-answering system: load your own documents into it and ask questions — you get accurate answers drawn from your files instead of the open web.
Is it a self-hosted app I run myself, or a library I code against?A self-hosted app, not a library: one Docker Compose command starts a service you use through a web front end. An API is included if you want to integrate it into your own code.
How do I get it running?Pull the qanything repository, enter the project root, and run the startup command — v2.0.0 boots the whole stack with a single Docker Compose line. There is also an online demo to try first.
What do I need installed before starting?Just Docker. Everything else — PDF parsing, OCR, embedding, rerank — ships inside the stack, and each component is independent and freely replaceable.
What can't it handle right now?Audio file support was removed in 2.0 because whisper-based parsing was slow and resource-hungry, and multi-GPU inference is gone too. The web search feature requires a VPN.
Which systems does it run on?Windows, macOS (including M-series Macs), and Linux. Version 2.0.0 is the first to start directly on Windows without WSL.
Can I use it without an internet connection?Yes — offline use is a supported mode in v2.0.0 (the older Python variant lacked it). Only the optional web search feature needs internet access.
Does my data stay on my machine?Yes — data security is a headline feature: the whole system is designed to be installed and used with the network cable unplugged, so your documents never leave your machine.
Is there a catch in the license for commercial use?The code is AGPL-3.0. Also note the open-source version was built on a fine-tuned QwenLM model — commercial use of that model should follow QwenLM's own license.
What file types can I ask questions about?PDF, Word (docx), PPT (pptx), Excel (xlsx), Markdown, email (eml), TXT, images (jpg/jpeg/png), CSV, and web links (html), with more coming. Q&A is also cross-language: you can ask in English about Chinese files and vice versa, regardless of the file's language.
Will answers stay accurate as my knowledge base grows to thousands of files?Yes — that's the core design problem it solves. A two-stage pipeline (embedding retrieval plus a reranker) keeps accuracy climbing as data grows, where single-stage embedding search degrades. There is no limit on the number of uploaded files, and retrieval stays fast thanks to the team's BCEmbedding models.
Does it come with its own AI model?Not anymore. Version 2.0.0 dropped the default local LLM: everything connects through the OpenAI-compatible interface configured in the front-end settings, so you can plug in any OpenAI-compatible service or run a local model via tools like ollama.
What can it do out of the box besides chatting with my files?A Kimi-style quick-start chat with no files attached, a retrieval-only mode, and custom Bots. Version 2.0 added FAQ entries, hybrid BM25+embedding search, online preview and editing of chunk blocks, file traceability preview, and log retrieval.
Size
114.4 MB
Stars
14.2K
Age
2y
Commits · 90 Days