Skip to main content

RAG (Retrieval-Augmented Generation) System

Project description

RAG (Retrieval-Augmented Generation) System

A Python-based RAG system that processes text files, generates embeddings, and stores them in a Postgres database with pgvector for efficient similarity search.

For detailed information, see:

Features

  • File ingestion (source code, Markdown, plain text)
  • Text chunking with configurable overlap
  • Vector embeddings via OpenAI or Hugging Face
  • Postgres + pgvector for vector storage and search
  • Project-based organization of documents

Quick Start

  1. Set up the environment:
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt
  1. Configure environment variables:
cp .env.example .env
# Edit .env with your settings:
# - Database credentials
# - OpenAI API key (if using OpenAI embeddings)
  1. Start the database:
task db:up
  1. Run the example:
task demo:example

Development

# Run tests
task test:integration

License

MIT License

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

postgres_rag-0.1.0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

postgres_rag-0.1.0-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file postgres_rag-0.1.0.tar.gz.

File metadata

  • Download URL: postgres_rag-0.1.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for postgres_rag-0.1.0.tar.gz
Algorithm Hash digest
SHA256 416768ba8a833147f5770ca338d7f26d68dab52d0d8c181c4288e1f5680edd1b
MD5 0131172a697b84b03eb06cc1fb1b20fd
BLAKE2b-256 9a556d6c14ac216e3de27db68e354991a0f3a4d1d346943ad98bfe9b267bdaa8

See more details on using hashes here.

File details

Details for the file postgres_rag-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: postgres_rag-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for postgres_rag-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9061529788f51cc7c8d422f52d0c7db9dd7d5513179c9dca192af279f874d192
MD5 28d81a87013b2b8ec77cec1e677d2456
BLAKE2b-256 56f2d5e8d334d94720e7bd24e8e14e1a1077e3bb9bdfab9675d44697775094d1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page