QueryGPT
Node.js sample that answers questions over your own text files using OpenAI embeddings
- Pricing
- Open source
- Platforms
- CLI, API, self-hosted
- Listing updated
- today
Similar tools
About QueryGPT
QueryGPT is an open-source AI tool for document search. It is available on CLI, API and self-hosted.
The README walks through a small Node.js project that splits a plain text file into paragraphs, embeds each one with an OpenAI embedding model, and stores the vectors locally. When a question arrives, it is embedded the same way, paragraphs are ranked by dot-product similarity, and the top few are passed to a completion model as context.
The author sets it up with the openai and dotenv packages and an API key in a .env file. The example uses a Wikipedia article on the University of Dhaka as source data, and the README notes that no fine-tuning or JSON conversion is needed because plain text files work directly.
The project suits developers who want a hands-on tutorial for retrieval-style question answering over documentation or business data. The README describes it as a learning project inspired by trainmy.ai rather than a packaged product.
What it does
- Paragraph embedding pipeline
- Splits source text into paragraphs and stores each one with its embedding vector in a local file.
- Similarity-based context selection
- Ranks stored paragraphs against the embedded question using dot-product scores and keeps the top few.
- Two prompt modes
- Offers one prompt that allows the model's own knowledge and one that restricts answers to the supplied context.
- Plain text input
- Works with ordinary text files without converting them to JSON or JSONL.
Good for
- Building a question-answering prototype over internal documentation
- Learning how embeddings and retrieval feed a completion model
- Querying a set of scientific papers or product data in plain text
Pricing
Open source
Free project; OpenAI API usage is billed separately by OpenAI.
Prices change. Check github.com before you buy.
QueryGPT FAQ
Does it require Python?
No. The README says the project is written in Node.js and JavaScript and does not require Python knowledge.
What input format does it accept?
The README states that plain text files work directly and do not need to be converted to JSON or JSONL.
Which model does the example use for completion?
The README mentions text-davinci-003 as an example completion model.
Is QueryGPT free?
Yes. QueryGPT is open source, so you can use and self-host it for free.
What are the best alternatives to QueryGPT?
The closest alternatives to QueryGPT are BlueWillow, Midjourney, Humata, ChatDOC and RoomGPT.
Where this comes from
- Description: written from the project's README and the project's website.
Alternatives to QueryGPT

Free text-to-image generator for logos, characters and photo-style artwork in the browser
- Freemium
- Generative art



Chat with PDFs and other documents to get sourced answers, summaries and translations
- Freemium
- Productivity

Upload a room photo and get AI-generated interior redesigns in different styles
- Freemium
- Generative art
