Skip to content

Repository files navigation

RAG for question answering

Short and quick answers to user queries based on input text document using RAG (Retrieval Augmented Generation).

Installation

This project uses the uv package manager for dependency management. Follow the steps below to set up the project:

  1. Clone the repository:

    git clone https://github.com/your-repo/rag_app.git
    cd rag_app/project3
  2. Install the dependencies using uv:

    uv install
  3. Verify the installation:

    uv check

Usage

Command-line Interface

  1. Run the application with a query string:

    uv run main.py --query "Your question here"
  2. If no query is provided, the default query will be used:

    uv run main.py
  3. The system will generate answers to the provided query.

FastAPI Endpoint

  1. Start the FastAPI server:

    uvicorn main2:app
  2. Access the /query endpoint to send a query:

    curl -X POST "http://127.0.0.1:8000/query" -d "input_query=Your question here"
  3. The server will return the response in JSON format.

Project Structure

  • pyproject.toml: Contains project metadata and dependencies.
  • uv.lock: Lock file for dependency versions.
  • main.py: Entry point for the command-line interface.
  • main2.py: Entry point for the FastAPI server.
  • Other files and directories: Supporting modules and resources for the project.

License

None

About

RAG for question answering

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages