SuperAPIAI Directory

QAnything

github.com · AI developer platforms

Question and Answer based on Anything.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

QAnything is a local knowledge base question-answering system open-sourced by NetEase Youdao, with the full name Question and Answer based on Anything. Its core goal is to enable users to perform question answering based on any local file without uploading data to the cloud. It supports fully offline installation and use, and works normally even when disconnected from the network, thereby ensuring data security.

Main uses and positioning: QAnything is aimed at scenarios that require building question-answering capabilities based on private documents. Users only need to drag any format of locally stored file into the system to obtain accurate, fast, and reliable answers. It is suitable both for personal knowledge management and for occasions such as internal enterprise document question answering and customer service knowledge bases where data must not leave the local environment.

Supported formats: currently supports PDF (pdf), Word (docx), PPT (pptx), Excel (xlsx), Markdown (md), Email (eml), TXT (txt), images (jpg, jpeg, png), CSV (csv), web links (html), etc., and more formats are continuously being added.

Core capabilities:

  1. Two-stage retrieval and ranking: adopts a combination of first-stage vector retrieval (embedding) and second-stage reranking (rerank). In scenarios with a large amount of knowledge base data, using only first-stage retrieval leads to the problem that retrieval performance degrades as the amount of data increases; after introducing second-stage reranking, accuracy can be steadily improved, and the more data there is, the better the performance. The system uses the BCEmbedding retrieval component, which performs outstandingly in Chinese-English bilingual and cross-lingual capabilities.
  2. Large-scale data question answering: supports question answering over massive data. Two-stage vector ranking solves the problem of retrieval degradation on large-scale data. There is no limit on the number of uploaded files, and retrieval speed is fast.
  3. Cross-lingual question answering: supports cross-lingual question answering, allowing free switching between Chinese and English, without being restricted by the language of the file itself.
  4. Hardware-friendly: runs in a pure CPU environment by default, supports multiple platforms such as Windows, Mac, and Linux, and has no other dependencies besides Docker.
  5. Flexible replacement: each dependent component (PDF parsing, OCR, embed, rerank, etc.) is completely independent and can be freely replaced.
  6. Multiple modes: supports a Kimi-like quick start mode, a no-file chat mode, a retrieval-only mode, and a custom Bot mode.

Usage:

  • Installation prerequisites: installation prerequisites must be met.
  • Step 1: pull the QAnything repository.
  • Step 2Step: Enter the project root directory and execute the startup command.
  • Step 3: After startup, you can begin experiencing it.
  • The system provides operation instructions for API DEBUG, shutting down the service, offline use, and more.

Version 2.0.0 update highlights: On August 23, 2024, QAnything was updated to version 2.0. This update includes improvements in usability, resource consumption, retrieval results, question-answering results, parsing results, frontend performance, service architecture, and usage methods. The old Docker version and Python version were merged into a new unified version, using a single-line Docker Compose command for one-click startup, ready to use out of the box. Specific optimizations include:

  • Support for frontend configuration of API_BASE, API_KEY, text chunk size, number of output tokens, number of context messages, and more.
  • Optimized instruction-following for Bot role settings, and each Bot can be configured with model parameters individually.
  • Support for creating multiple conversation windows and saving multiple sets of historical question-answering records at the same time.
  • Support for saving question-answering records as images.
  • Optimized file upload logic, with file parsing and question-answering requests independent of each other, so uploading files no longer affects question answering.
  • Optimized image size. The compressed size of the old version image was 18.94GB, while the new version is reduced to 4.88GB, shrinking to one quarter of the original, and a complete Dockerfile is provided.
  • Retrieval optimization, with chunk fusion and ranking added, aggregating single documents or dual documents.
  • Metadata information is embedded in both the retrieval stage and the question-answering stage to improve retrieval and question-answering performance.
  • Display the upload progress of all files in the knowledge base.
  • Display the upload progress of a single file in the knowledge base and the time consumed at each stage.
  • Question-answering information statistics, including time consumed at each stage, token consumption, model information, and more.
  • User information statistics, including the total number of uploaded files, total time consumed, question-answering history, and more.
  • xlsx file format supports parsing multiple sheets.
  • Optimized the issue of missed recognition in PDF tables.
  • Fixed some parsing errors in DOCX files.
  • Optimized FAQ matching logic.
  • Support txt files in non-UTF-8 encodings.

Parsing performance comparison (version 1.4 vs version 2.0):

  • Large table parsing: Version 2.0 can analyze table structure, including row and column layout, automatically identify headers and place them at the top of each split table fragment, avoiding semantic interruption caused by logical splitting of long tables.
  • Column layout and cross-page layout: Version 2.0 can recognize two-column or multi-column text layouts, following human reading habitsConventionally divide text blocks correctly; at the same time, images in the document can be saved to ensure content integrity. In the example, version 1.4 divided the cross-page text "higher" into the next text block, which is not conducive to large model semantic understanding; version 2.0 divides it correctly and parses images interspersed in text paragraphs into corresponding chunk statements. Non-body text such as "Figure 1 Recognition and Authorization and Their Supporting Relationships 37" and "Cover Feature" was successfully filtered out.
  • Tables interspersed between text blocks: version 1.4 cannot recognize tables and only parses them according to text paragraph formatting, destroying the logical structure of the table and introducing messy and useless text, affecting the accuracy of large model answers; version 2.0 can recognize and parse tables embedded in text, improving parsing quality and answer accuracy.
  • Text under specific subheadings: version 2.0 prioritizes ensuring that these texts are split into the same chunk block to maintain logical coherence; when the text is too long and needs to be split, the same subheading is repeated before each split text block to indicate attribution. In the example, the same subheading "European Conference: The Legal Status of Robots" was added to all three text blocks, effectively avoiding semantic logical incoherence caused by splitting overly long text.
  • Excel (.xlsx) complex formats: version 2.0 has carried out a series of optimizations to accurately recognize and process row and column data.

Other information:

  • The open-source version is based on QwenLM and has been fine-tuned on a large number of professional question-answering datasets, significantly enhancing question-answering capabilities. For commercial use, please follow the QwenLM license.
  • Provides an online experience, as well as the Youdao Quick Reading platform.
  • Its BCEmbedding (embedding and rerank) can be used separately.
  • Provides a roadmap and feedback, community and support channels.
  • Business contact information: phone 010-82558901, email AIcloud_Business@corp.youdao.com.

Limitations and notes:

  • Specific installation prerequisites, startup commands, API debugging methods, shutting down services, offline usage steps, and other details: the official text does not provide complete command content, so they are not provided for now.
  • The list of supported formats is subject to the official description, and more formats are still being added.
  • Commercial use of the open-source version requires compliance with the QwenLM license.
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools