Skip to content

QueryLib: Effortlessly extract and query documentation with intelligent retrieval.

Notifications You must be signed in to change notification settings

aadya940/querylib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QueryLib

QueryLib is a Python library designed for extracting documentation from Python packages and implementing a Retrieval-Augmented Generation (RAG) system for querying that documentation.

Features

  • Docstring Extraction: Efficiently extracts documentation from Python modules.
  • RAG System: Optimized system for querying documentation using embeddings and FAISS for fast retrieval.

Installation

To install the required dependencies, you can use pip:

git clone ...
cd querylib/
pip install -r requirements.txt
pip install .

Usage

DocstringExtractor

To extract documentation from a Python package:

from querylib.extractor import DocstringExtractor

extractor = DocstringExtractor("numpy")
docs = extractor.extract_docs()
extractor.save_to_json(docs, "numpy.json")

DocumentationRAG

To set up the RAG system:

from querylib.rag import DocumentationRAG

rag_system = DocumentationRAG("numpy.json")
response = rag_system.ask_query("How to add two vectors together using Numpy?")
print(response)

Contributing

Feel free to submit issues or pull requests to improve the library.

License

This project is licensed under the MIT License.

About

QueryLib: Effortlessly extract and query documentation with intelligent retrieval.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages