Pankaj10346 commited on
Commit
e855fd6
Β·
verified Β·
1 Parent(s): 1b4d69b

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +11 -88
README.md CHANGED
@@ -1,14 +1,12 @@
1
  ---
2
- title: Predii RAG Assignment
3
  emoji: πŸ€–
4
  colorFrom: blue
5
  colorTo: green
6
- sdk: gradio
7
- sdk_version: 4.44.1
8
- app_file: app.py
9
  pinned: false
10
  license: mit
11
- python_version: "3.10"
12
  short_description: Ford F-150 Service Manual RAG System
13
  ---
14
 
@@ -26,90 +24,15 @@ A production-ready Retrieval-Augmented Generation (RAG) system for querying Ford
26
  - **Faithfulness Evaluation**: Quality assurance using LLM-as-judge
27
  - **Comprehensive Audit Logging**: Track all queries and responses
28
 
29
- ## Quick Start
30
-
31
- ### Prerequisites
32
-
33
- - Python 3.8+
34
- - OpenAI API Key
35
- - Cohere API Key (optional, for reranking)
36
-
37
- ### Installation
38
-
39
- ```bash
40
- pip install -r requirements.txt
41
- ```
42
-
43
- ### Setup
44
-
45
- 1. Create a `.env` file in the root directory:
46
- ```
47
- OPENAI_API_KEY=your_openai_api_key
48
- COHERE_API_KEY=your_cohere_api_key
49
- ```
50
-
51
- 2. Preprocess the PDF (first time only):
52
- ```bash
53
- python -m preprocessing.embeddings
54
- ```
55
-
56
- 3. Run the web interface:
57
- ```bash
58
- python app.py
59
- ```
60
-
61
- 4. Or run the CLI:
62
- ```bash
63
- python unified_rag_system.py
64
- ```
65
-
66
  ## Usage
67
 
68
- ### Web Interface
69
-
70
- The Gradio interface provides a user-friendly way to interact with the RAG system:
71
-
72
- - Ask questions about Ford F-150 suspension and repair
73
- - Toggle query rewriting, MMR diversification, and evaluation
74
- - View retrieved chunks and evaluation metrics
75
-
76
- ### CLI
77
-
78
- Run queries from the command line:
79
-
80
- ```python
81
- from unified_rag_system import UnifiedRAGSystem
82
-
83
- rag = UnifiedRAGSystem()
84
- result = rag.query("What is the torque specification for the front shock absorber?")
85
- print(result.answer)
86
- ```
87
-
88
- ## Project Structure
89
-
90
- ```
91
- RAG-Assignment/
92
- β”œβ”€β”€ preprocessing/ # PDF processing and chunking
93
- β”œβ”€β”€ retrieval/ # Retrieval and generation
94
- β”œβ”€β”€ reranking/ # Reranking and diversification
95
- β”œβ”€β”€ utils/ # Shared utilities
96
- β”œβ”€β”€ chunks/ # Document chunks
97
- β”œβ”€β”€ chroma_db/ # Vector database
98
- β”œβ”€β”€ tests/ # Test files
99
- β”œβ”€β”€ app.py # Gradio web interface
100
- β”œβ”€β”€ unified_rag_system.py
101
- β”œβ”€β”€ requirements.txt
102
- └── .env
103
- ```
104
-
105
- ## Architecture
106
-
107
- See [ARCHITECTURE.md](ARCHITECTURE.md) for detailed system architecture.
108
-
109
- ## Requirements
110
-
111
- See [requirements.txt](requirements.txt) for dependencies.
112
 
113
- ## License
114
 
115
- MIT License
 
 
 
 
 
 
1
  ---
2
+ title: Predii-RAG-Assignment
3
  emoji: πŸ€–
4
  colorFrom: blue
5
  colorTo: green
6
+ sdk: docker
7
+ app_port: 7860
 
8
  pinned: false
9
  license: mit
 
10
  short_description: Ford F-150 Service Manual RAG System
11
  ---
12
 
 
24
  - **Faithfulness Evaluation**: Quality assurance using LLM-as-judge
25
  - **Comprehensive Audit Logging**: Track all queries and responses
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  ## Usage
28
 
29
+ Simply type your question about Ford F-150 suspension and repair procedures in the interface above.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
+ ## Technology Stack
32
 
33
+ - **LLM**: OpenAI GPT-4o-mini
34
+ - **Embeddings**: OpenAI text-embedding-3-large
35
+ - **Vector DB**: ChromaDB
36
+ - **Reranking**: Cohere rerank-english-v3.0
37
+ - **Web Framework**: Gradio
38
+ - **Deployment**: Docker