├── data ├── The_intelligent_investor.pdf └── text_chunks_and_embeddings_df.csv ├── llm ├── __pycache__ │ ├── get_response.cpython-311.pyc │ ├── get_response.cpython-312.pyc │ ├── llm_response.cpython-311.pyc │ ├── get_gemini_response.cpython-311.pyc │ └── get_gemini_response.cpython-312.pyc ├── get_gemini_response.py ├── get_response.py └── llm_response.py ├── services ├── __pycache__ │ ├── retrieve.cpython-311.pyc │ ├── retrieve.cpython-312.pyc │ ├── embed_model.cpython-311.pyc │ ├── embed_model.cpython-312.pyc │ ├── get_pdf_path.cpython-311.pyc │ ├── get_pdf_path.cpython-312.pyc │ ├── pdf_to_text.cpython-311.pyc │ ├── pdf_to_text.cpython-312.pyc │ ├── process_chunks.cpython-311.pyc │ ├── process_chunks.cpython-312.pyc │ ├── text_to_chucks.cpython-311.pyc │ └── text_to_chucks.cpython-312.pyc ├── text_to_chucks.py ├── get_pdf_path.py ├── pdf_to_text.py ├── process_chunks.py ├── embed_model.py └── retrieve.py ├── requirements.txt ├── LICENSE ├── main.py ├── create_embeddings.py ├── README.md └── .gitignore /data/The_intelligent_investor.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adityaghai07/GenRAG/HEAD/data/The_intelligent_investor.pdf -------------------------------------------------------------------------------- /llm/__pycache__/get_response.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adityaghai07/GenRAG/HEAD/llm/__pycache__/get_response.cpython-311.pyc -------------------------------------------------------------------------------- /llm/__pycache__/get_response.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adityaghai07/GenRAG/HEAD/llm/__pycache__/get_response.cpython-312.pyc -------------------------------------------------------------------------------- /llm/__pycache__/llm_response.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adityaghai07/GenRAG/HEAD/llm/__pycache__/llm_response.cpython-311.pyc -------------------------------------------------------------------------------- /services/__pycache__/retrieve.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adityaghai07/GenRAG/HEAD/services/__pycache__/retrieve.cpython-311.pyc -------------------------------------------------------------------------------- /services/__pycache__/retrieve.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adityaghai07/GenRAG/HEAD/services/__pycache__/retrieve.cpython-312.pyc -------------------------------------------------------------------------------- /services/__pycache__/embed_model.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adityaghai07/GenRAG/HEAD/services/__pycache__/embed_model.cpython-311.pyc -------------------------------------------------------------------------------- /services/__pycache__/embed_model.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adityaghai07/GenRAG/HEAD/services/__pycache__/embed_model.cpython-312.pyc -------------------------------------------------------------------------------- /services/__pycache__/get_pdf_path.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adityaghai07/GenRAG/HEAD/services/__pycache__/get_pdf_path.cpython-311.pyc -------------------------------------------------------------------------------- /services/__pycache__/get_pdf_path.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adityaghai07/GenRAG/HEAD/services/__pycache__/get_pdf_path.cpython-312.pyc -------------------------------------------------------------------------------- /services/__pycache__/pdf_to_text.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adityaghai07/GenRAG/HEAD/services/__pycache__/pdf_to_text.cpython-311.pyc -------------------------------------------------------------------------------- /services/__pycache__/pdf_to_text.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adityaghai07/GenRAG/HEAD/services/__pycache__/pdf_to_text.cpython-312.pyc -------------------------------------------------------------------------------- /llm/__pycache__/get_gemini_response.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adityaghai07/GenRAG/HEAD/llm/__pycache__/get_gemini_response.cpython-311.pyc -------------------------------------------------------------------------------- /llm/__pycache__/get_gemini_response.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adityaghai07/GenRAG/HEAD/llm/__pycache__/get_gemini_response.cpython-312.pyc -------------------------------------------------------------------------------- /services/__pycache__/process_chunks.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adityaghai07/GenRAG/HEAD/services/__pycache__/process_chunks.cpython-311.pyc -------------------------------------------------------------------------------- /services/__pycache__/process_chunks.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adityaghai07/GenRAG/HEAD/services/__pycache__/process_chunks.cpython-312.pyc -------------------------------------------------------------------------------- /services/__pycache__/text_to_chucks.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adityaghai07/GenRAG/HEAD/services/__pycache__/text_to_chucks.cpython-311.pyc -------------------------------------------------------------------------------- /services/__pycache__/text_to_chucks.cpython-312.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adityaghai07/GenRAG/HEAD/services/__pycache__/text_to_chucks.cpython-312.pyc -------------------------------------------------------------------------------- /services/text_to_chucks.py: -------------------------------------------------------------------------------- 1 | def split_list(input_list: list, 2 | slice_size: int) -> list[list[str]]: 3 | return [input_list[i:i + slice_size] for i in range(0, len(input_list), slice_size)] 4 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | PyMuPDF==1.23.26 2 | matplotlib==3.8.3 3 | numpy==1.26.4 4 | pandas==2.2.1 5 | Requests==2.31.0 6 | sentence_transformers==2.5.1 7 | spacy 8 | tqdm==4.66.2 9 | transformers==4.38.2 10 | accelerate 11 | bitsandbytes 12 | jupyter 13 | wheel 14 | google-generativeai 15 | python-dotenv==1.0.0 16 | google-genai -------------------------------------------------------------------------------- /services/get_pdf_path.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | def get_pdf_path(): 4 | 5 | pdf_path = input("Please enter the path to your PDF file (e.g., data/your_file.pdf): ").strip() 6 | 7 | 8 | if os.path.isfile(pdf_path): 9 | print(f"PDF path set to: {pdf_path}") 10 | return pdf_path 11 | else: 12 | print(f"PDF file not found at the specified path: {pdf_path}") 13 | return None 14 | 15 | -------------------------------------------------------------------------------- /llm/get_gemini_response.py: -------------------------------------------------------------------------------- 1 | from google import genai 2 | import os 3 | import dotenv 4 | 5 | dotenv.load_dotenv() 6 | client = genai.Client() 7 | 8 | response = client.models.generate_content( 9 | model="gemini-2.5-flash-lite", contents="Explain how AI works in a few words" 10 | ) 11 | 12 | 13 | def get_gemini_response(context, query): 14 | 15 | response = client.models.generate_content( 16 | model="gemini-2.5-flash", 17 | contents=f""" 18 | Using the context given below answer the query. 19 | 20 | CONTEXT: {context} 21 | 22 | QUERY: {query} 23 | """) 24 | 25 | return response.text 26 | 27 | 28 | -------------------------------------------------------------------------------- /services/pdf_to_text.py: -------------------------------------------------------------------------------- 1 | 2 | pdf_path = 'data/The_intelligent_investor.pdf' 3 | 4 | import fitz 5 | from tqdm.auto import tqdm 6 | 7 | def text_formatter(text: str) -> str: 8 | 9 | cleaned_text = text.replace("\n", " ").strip() 10 | return cleaned_text 11 | 12 | 13 | def open_and_read_pdf(pdf_path: str) -> list[dict]: 14 | 15 | print(f"Opening and reading PDF: {pdf_path}") 16 | doc = fitz.open(pdf_path) 17 | pages_and_texts = [] 18 | for page_number, page in tqdm(enumerate(doc)): 19 | text = page.get_text() 20 | text = text_formatter(text) 21 | pages_and_texts.append({"page_number": page_number - 41, 22 | "page_char_count": len(text), 23 | "page_word_count": len(text.split(" ")), 24 | "page_sentence_count_raw": len(text.split(". ")), 25 | "page_token_count": len(text) / 4, 26 | "text": text}) 27 | 28 | print(f"Total pages: {len(pages_and_texts)}") 29 | return pages_and_texts 30 | 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Aditya Ghai 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /llm/get_response.py: -------------------------------------------------------------------------------- 1 | # from llm.llm_response import llm_response 2 | from llm.get_gemini_response import get_gemini_response 3 | from services.retrieve import retrieve_relevant_resources 4 | 5 | def ask (query, embeddings, pages_and_chunks,embeddings_df_save_path,): 6 | """ 7 | Takes a query, retrieves most relevant resources and prints them out in descending order. 8 | 9 | Note: Requires pages_and_chunks to be formatted in a specific way (see above for reference). 10 | """ 11 | 12 | scores, indices = retrieve_relevant_resources(query=query, 13 | embeddings=embeddings) 14 | 15 | 16 | 17 | context_items = [pages_and_chunks[i] for i in indices] 18 | 19 | # Extract the 'content' from each dictionary and join them into a single string 20 | context = "- " + "\n- ".join([item["sentence_chunk"] for item in context_items]) 21 | 22 | 23 | for i, item in enumerate(context_items): 24 | item["score"] = scores[i].cpu() 25 | 26 | print(f"query: {query}") 27 | print("\n\n") 28 | 29 | ans = get_gemini_response(query=query,context=context) 30 | 31 | return ans 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /services/process_chunks.py: -------------------------------------------------------------------------------- 1 | import re 2 | from tqdm import tqdm 3 | 4 | 5 | def process_chunks(pages_and_texts): 6 | pages_and_chunks = [] 7 | for item in tqdm(pages_and_texts): 8 | for sentence_chunk in item["sentence_chunks"]: 9 | chunk_dict = {} 10 | chunk_dict["page_number"] = item["page_number"] 11 | 12 | 13 | joined_sentence_chunk = "".join(sentence_chunk).replace(" ", " ").strip() 14 | joined_sentence_chunk = re.sub(r'\.([A-Z])', r'. \1', joined_sentence_chunk) # ".A" -> ". A" for any 15 | chunk_dict["sentence_chunk"] = joined_sentence_chunk 16 | 17 | # Get stats about the chunk 18 | chunk_dict["chunk_char_count"] = len(joined_sentence_chunk) 19 | chunk_dict["chunk_word_count"] = len([word for word in joined_sentence_chunk.split(" ")]) 20 | chunk_dict["chunk_token_count"] = len(joined_sentence_chunk) / 4 # 1 token = ~4 characters 21 | 22 | pages_and_chunks.append(chunk_dict) 23 | print(len(pages_and_chunks)) 24 | 25 | print(f"Total chunks: {len(pages_and_chunks)}") 26 | return pages_and_chunks 27 | 28 | 29 | -------------------------------------------------------------------------------- /services/embed_model.py: -------------------------------------------------------------------------------- 1 | from sentence_transformers import SentenceTransformer 2 | from tqdm.auto import tqdm 3 | 4 | 5 | # device = "cuda" if torch.cuda.is_available() else "cpu" 6 | device = "cpu" 7 | 8 | 9 | print(f"Loading the model on device: {device}") 10 | embedding_model = SentenceTransformer(model_name_or_path="all-mpnet-base-v2", 11 | device=device) 12 | 13 | embedding_model.to(device) 14 | 15 | print("Model loaded successfully") 16 | 17 | 18 | def embed_text(pages_and_chunks_over_min_token_len, batch_size=32): 19 | 20 | print("Embedding text chunks in batches") 21 | all_chunks = [item["sentence_chunk"] for item in pages_and_chunks_over_min_token_len] 22 | 23 | for i in tqdm(range(0, len(all_chunks), batch_size), desc="Processing batches"): 24 | batch = all_chunks[i:i + batch_size] 25 | 26 | embeddings = embedding_model.encode( 27 | batch, 28 | device=device, 29 | convert_to_tensor=True, 30 | show_progress_bar=False 31 | ) 32 | 33 | for j, emb in enumerate(embeddings): 34 | pages_and_chunks_over_min_token_len[i + j]["embedding"] = emb 35 | 36 | print("Embedding complete") -------------------------------------------------------------------------------- /llm/llm_response.py: -------------------------------------------------------------------------------- 1 | from transformers import AutoTokenizer, AutoModelForCausalLM 2 | import torch 3 | tokenizer = AutoTokenizer.from_pretrained("llmware/bling-sheared-llama-1.3b-0.1") 4 | model = AutoModelForCausalLM.from_pretrained("llmware/bling-sheared-llama-1.3b-0.1") 5 | 6 | # device = "cuda" if torch.cuda.is_available() else "cpu" 7 | 8 | device="cpu" 9 | 10 | 11 | 12 | def llm_response(new_prompt:str,context:str): 13 | """ 14 | Takes a prompt and returns a response from the Bling-Sheared Llama model. 15 | """ 16 | # device = "cuda" if torch.cuda.is_available() else "cpu" 17 | device ="cpu" 18 | prompt = f""": 19 | {context} 20 | 21 | Given the context answer the following questions. 22 | 23 | {new_prompt} 24 | : 25 | """ 26 | 27 | inputs = tokenizer(prompt, return_tensors="pt") 28 | start_of_output = len(inputs.input_ids[0]) 29 | 30 | 31 | 32 | outputs = model.generate( 33 | inputs.input_ids.to(device), 34 | eos_token_id=tokenizer.eos_token_id, 35 | pad_token_id=tokenizer.eos_token_id, 36 | do_sample=True, 37 | temperature=0.3, 38 | max_new_tokens=100, 39 | ) 40 | 41 | output_only = tokenizer.decode(outputs[0][start_of_output:],skip_special_tokens=True) 42 | 43 | 44 | eot = output_only.find("<|endoftext|>") 45 | if eot > -1: 46 | output_only = output_only[:eot] 47 | 48 | return output_only -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | from sentence_transformers import SentenceTransformer 2 | from tqdm.auto import tqdm 3 | import pandas as pd 4 | import numpy as np 5 | import torch 6 | from time import sleep 7 | from services.retrieve import print_wrapped,retrieve_relevant_resources,print_top_results_and_scores 8 | from llm.get_response import ask 9 | 10 | 11 | device = "cpu" 12 | query = input("Enter your query: ") 13 | 14 | 15 | 16 | print("The device is set to:",device) 17 | print("This may take a while...") 18 | 19 | sleep(2) 20 | 21 | 22 | print("Loading the Saved Embeddings DataFrame...") 23 | 24 | embeddings_df_save_path = "data/text_chunks_and_embeddings_df.csv" 25 | text_chunks_and_embeddings_df = pd.read_csv(embeddings_df_save_path) 26 | 27 | 28 | 29 | 30 | print("Converting the 'embedding' column to a numpy array...") 31 | sleep(2) 32 | 33 | 34 | pages_and_chunks = text_chunks_and_embeddings_df.to_dict(orient="records") 35 | 36 | embeddings_list = text_chunks_and_embeddings_df['embedding'] 37 | cleaned_embeddings = [] 38 | 39 | for embedding in embeddings_list: 40 | embedding_cleaned = embedding.replace('tensor([', '').replace('])', '') 41 | embedding_array = np.array([float(i) for i in embedding_cleaned.split(',')]) 42 | cleaned_embeddings.append(embedding_array) 43 | 44 | embeddings_matrix = np.vstack(cleaned_embeddings) 45 | embeddings = torch.tensor(embeddings_matrix, dtype=torch.float32) 46 | 47 | print("Embeddings tensor (768, N):", embeddings) 48 | print("Shape of embeddings:", embeddings.shape) 49 | 50 | 51 | 52 | print("Successsfully Converted the 'embedding' column to a torch tensor.") 53 | sleep(2) 54 | 55 | print("\n\n") 56 | print("Retrieving the most relevant resources...") 57 | print("\n\n") 58 | 59 | sleep(2) 60 | 61 | 62 | print_top_results_and_scores(query=query, embeddings=embeddings, pages_and_chunks=pages_and_chunks) 63 | 64 | 65 | print("Using Gemini to generate a response...") 66 | print("\n\n") 67 | sleep(2) 68 | 69 | 70 | 71 | 72 | ans = ask(query=query, embeddings=embeddings, pages_and_chunks=pages_and_chunks,embeddings_df_save_path=embeddings_df_save_path) 73 | 74 | print_wrapped(ans) 75 | -------------------------------------------------------------------------------- /create_embeddings.py: -------------------------------------------------------------------------------- 1 | from services.pdf_to_text import open_and_read_pdf,text_formatter 2 | from tqdm.auto import tqdm 3 | from services.text_to_chucks import split_list 4 | from services.process_chunks import process_chunks 5 | from services.embed_model import embed_text 6 | from services.get_pdf_path import get_pdf_path 7 | import pandas as pd 8 | import warnings 9 | warnings.filterwarnings('ignore', category=DeprecationWarning, module='tensorflow') 10 | import random 11 | from time import sleep 12 | from spacy.lang.en import English 13 | nlp = English() 14 | nlp.add_pipe("sentencizer") 15 | 16 | 17 | 18 | 19 | pdf_path = get_pdf_path() 20 | 21 | ######################################################################################## 22 | num_sentence_chunk_size = 10 23 | min_token_length = 30 24 | ######################################################################################## 25 | 26 | print("Reading PDF and splitting text into chunks...") 27 | print("\n\n") 28 | 29 | pages_and_texts = open_and_read_pdf(pdf_path=pdf_path) 30 | 31 | sleep(2) 32 | 33 | for item in tqdm(pages_and_texts): 34 | item["sentences"] = list(nlp(item["text"]).sents) 35 | 36 | item["sentences"] = [str(sentence) for sentence in item["sentences"]] 37 | 38 | item["page_sentence_count_spacy"] = len(item["sentences"]) 39 | 40 | 41 | for item in tqdm(pages_and_texts): 42 | item["sentence_chunks"] = split_list(input_list=item["sentences"], 43 | slice_size=num_sentence_chunk_size) 44 | item["num_chunks"] = len(item["sentence_chunks"]) 45 | 46 | 47 | pages_and_chunks = process_chunks(pages_and_texts=pages_and_texts) 48 | 49 | df = pd.DataFrame(pages_and_chunks) 50 | print(df.describe().round(2)) 51 | 52 | 53 | print("Removing text chunks with small size...") 54 | print("\n\n") 55 | 56 | 57 | sleep(2) 58 | 59 | 60 | pages_and_chunks_over_min_token_len = df[df["chunk_token_count"] > min_token_length].to_dict(orient="records") 61 | 62 | 63 | embed_text(pages_and_chunks_over_min_token_len) 64 | 65 | print(pages_and_chunks_over_min_token_len[0]) 66 | 67 | 68 | print("Saving text chunks and embeddings to CSV") 69 | 70 | sleep(2) 71 | 72 | text_chunks_and_embeddings_df = pd.DataFrame(pages_and_chunks_over_min_token_len) 73 | embeddings_df_save_path = "data/text_chunks_and_embeddings_df.csv" 74 | text_chunks_and_embeddings_df.to_csv(embeddings_df_save_path, index=False) 75 | 76 | 77 | 78 | text_chunks_and_embedding_df_load = pd.read_csv(embeddings_df_save_path) 79 | print(text_chunks_and_embedding_df_load.head()) 80 | 81 | sleep(2) 82 | 83 | 84 | print("\n\n") 85 | print("Successfully saved text chunks and embeddings to CSV") -------------------------------------------------------------------------------- /services/retrieve.py: -------------------------------------------------------------------------------- 1 | import torch 2 | from sentence_transformers import SentenceTransformer, util 3 | from timeit import default_timer as timer 4 | import textwrap 5 | 6 | # device = "cuda" if torch.cuda.is_available() else "cpu" 7 | device = "cpu" 8 | 9 | embedding_model = SentenceTransformer(model_name_or_path="all-mpnet-base-v2", 10 | device=device) 11 | 12 | embedding_model.to(device) 13 | 14 | 15 | 16 | 17 | 18 | def print_wrapped(text, wrap_length=80): 19 | wrapped_text = textwrap.fill(text, wrap_length) 20 | print(wrapped_text) 21 | 22 | 23 | 24 | def retrieve_relevant_resources(query: str, 25 | embeddings: torch.tensor, 26 | model: SentenceTransformer=embedding_model, 27 | n_resources_to_return: int=2, 28 | print_time: bool=True): 29 | """ 30 | Embeds a query with model and returns top k scores and indices from embeddings. 31 | """ 32 | 33 | # Embed the query 34 | query_embedding = model.encode(query, 35 | convert_to_tensor=True) 36 | 37 | # Get dot product scores on embeddings 38 | start_time = timer() 39 | dot_scores = util.dot_score(query_embedding, embeddings)[0] 40 | end_time = timer() 41 | 42 | if print_time: 43 | print(f"[INFO] Time taken to get scores on {len(embeddings)} embeddings: {end_time-start_time:.5f} seconds.") 44 | 45 | scores, indices = torch.topk(input=dot_scores, 46 | k=n_resources_to_return) 47 | 48 | return scores, indices 49 | 50 | def print_top_results_and_scores(query: str, 51 | embeddings: torch.tensor, 52 | pages_and_chunks: list[dict], 53 | n_resources_to_return: int=2): 54 | """ 55 | Takes a query, retrieves most relevant resources and prints them out in descending order. 56 | 57 | Note: Requires pages_and_chunks to be formatted in a specific way (see above for reference). 58 | """ 59 | 60 | scores, indices = retrieve_relevant_resources(query=query, 61 | embeddings=embeddings, 62 | n_resources_to_return=n_resources_to_return) 63 | 64 | print(f"Query: {query}\n") 65 | print("Results:") 66 | # Loop through zipped together scores and indicies 67 | for score, index in zip(scores, indices): 68 | print(f"Score: {score:.4f}") 69 | # Print relevant sentence chunk (since the scores are in descending order, the most relevant chunk will be first) 70 | print_wrapped(pages_and_chunks[index]["sentence_chunk"]) 71 | 72 | print("\n") -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GenRAG 2 | 3 | ![MIT License](https://img.shields.io/badge/License-MIT-yellow.svg) 4 | 5 | GenRAG is a terminal tool designed to set up a Retrieval-Augmented Generation Pipeline locally from scratch, without utilizing any high-level frameworks like LangChain or vector databases. It includes features such as recursive text splitting, chunking, and building embeddings. The embeddings are stored in a CSV file,without using any Vector Databases and searching is based on cosine similarity. 6 | 7 | ## Features 8 | 9 | - Recursive text splitting 10 | - Text chunking 11 | - Building embeddings 12 | - Storing embeddings in a CSV file 13 | - Searching based on cosine similarity 14 | - Inference from local LLM/API 15 | 16 | 17 | ## Installation 18 | 19 | 1. Clone the repository: 20 | ```sh 21 | git clone https://github.com/adityaghai07/GenRAG.git 22 | cd GenRAG 23 | ``` 24 | 25 | 2. Create and activate a virtual environment: 26 | ```sh 27 | python3 -m venv env 28 | source env/bin/activate # On Windows use `env\Scripts\activate` 29 | ``` 30 | 31 | 3. Install the required dependencies: 32 | ```sh 33 | pip install -r requirements.txt 34 | ``` 35 | 36 | ## Usage 37 | 38 | 1. Add a PDF file to the `data` folder and change the path in the script as necessary. 39 | 2. Create embeddings by running: 40 | ```sh 41 | python3 create_embeddings.py 42 | ``` 43 | You should see a CSV file generated in the `data` folder. 44 | 45 | 3. Run the main script: 46 | ```sh 47 | python3 main.py 48 | ``` 49 | Enter your query when prompted. 50 | 51 | 52 | 53 | 54 | ## LLM Response 55 | 56 | You can use both a local LLM or an LLM from an API like Gemini for generating responses. 57 | 58 | - **Local LLM**: If you have the capability to run a local LLM, you can use it for generating responses. Cause mine is too slow :( 59 | 60 | - **LLM from API**: If your system is not powerful enough for local inference, you can use an API like Gemini. To do this, create a `.env` file and pass the Gemini API key. 61 | 62 | ### Using Gemini API 63 | 64 | 1. Create a `.env` file in the root directory of the project. 65 | 2. Add your Gemini API key to the `.env` file: 66 | ```env 67 | GEMINI_API_KEY=your_api_key_here 68 | ``` 69 | 3. The system will use the API key for generating responses through the Gemini API. 70 | 71 | --- 72 | 73 | 74 | 75 | ## Contributing 76 | 77 | Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**. 78 | 79 | 1. Fork the Project 80 | 2. Create your Feature Branch 81 | ```bash 82 | git checkout -b feature/AmazingFeature 83 | ``` 84 | 3. Commit your Changes 85 | ```bash 86 | git commit -m 'Add some AmazingFeature' 87 | ``` 88 | 6. Push to the Branch 89 | ```bash 90 | git push origin feature/AmazingFeature 91 | ``` 92 | 7. Open a Pull Request 93 | 94 | 95 | 96 | ## Credits 97 | 98 | Special thanks to the following YouTube channels and research papers for their invaluable resources and insights: 99 | 100 | ### YouTube Channels 101 | 102 | - [AI Anytime](https://www.youtube.com/@AIAnytime) 103 | - [Daniel Brouke](https://www.youtube.com/@mrdbourke) 104 | - [Krish Naik](https://www.youtube.com/@krishnaik06) 105 | - [Codebasics](https://www.youtube.com/@codebasics) 106 | - [CampusX](https://www.youtube.com/@campusx-official) 107 | 108 | ### Research Papers 109 | 110 | - Patrick Lewis ., "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks" [arXiv:2005.11401](https://arxiv.org/abs/2005.11401) 111 | - Vaswani et al., "Attention is All You Need" [arXiv:1706.03762](https://arxiv.org/abs/1706.03762) 112 | - Reimers et al., "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks" [arXiv:1908.10084](https://arxiv.org/abs/1908.10084) 113 | 114 | ## License 115 | 116 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. 117 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | /env 3 | # Byte-compiled / optimized / DLL files 4 | __pycache__/ 5 | *.py[cod] 6 | *$py.class 7 | 8 | # C extensions 9 | *.so 10 | 11 | # Distribution / packaging 12 | .Python 13 | build/ 14 | develop-eggs/ 15 | dist/ 16 | downloads/ 17 | eggs/ 18 | .eggs/ 19 | lib/ 20 | lib64/ 21 | parts/ 22 | sdist/ 23 | var/ 24 | wheels/ 25 | share/python-wheels/ 26 | *.egg-info/ 27 | .installed.cfg 28 | *.egg 29 | MANIFEST 30 | 31 | # PyInstaller 32 | # Usually these files are written by a python script from a template 33 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 34 | *.manifest 35 | *.spec 36 | 37 | # Installer logs 38 | pip-log.txt 39 | pip-delete-this-directory.txt 40 | 41 | # Unit test / coverage reports 42 | htmlcov/ 43 | .tox/ 44 | .nox/ 45 | .coverage 46 | .coverage.* 47 | .cache 48 | nosetests.xml 49 | coverage.xml 50 | *.cover 51 | *.py,cover 52 | .hypothesis/ 53 | .pytest_cache/ 54 | cover/ 55 | 56 | # Translations 57 | *.mo 58 | *.pot 59 | 60 | # Django stuff: 61 | *.log 62 | local_settings.py 63 | db.sqlite3 64 | db.sqlite3-journal 65 | 66 | # Flask stuff: 67 | instance/ 68 | .webassets-cache 69 | 70 | # Scrapy stuff: 71 | .scrapy 72 | 73 | # Sphinx documentation 74 | docs/_build/ 75 | 76 | # PyBuilder 77 | .pybuilder/ 78 | target/ 79 | 80 | # Jupyter Notebook 81 | .ipynb_checkpoints 82 | 83 | # IPython 84 | profile_default/ 85 | ipython_config.py 86 | 87 | # pyenv 88 | # For a library or package, you might want to ignore these files since the code is 89 | # intended to run in multiple environments; otherwise, check them in: 90 | # .python-version 91 | 92 | # pipenv 93 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 94 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 95 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 96 | # install all needed dependencies. 97 | #Pipfile.lock 98 | 99 | # UV 100 | # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control. 101 | # This is especially recommended for binary packages to ensure reproducibility, and is more 102 | # commonly ignored for libraries. 103 | #uv.lock 104 | 105 | # poetry 106 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 107 | # This is especially recommended for binary packages to ensure reproducibility, and is more 108 | # commonly ignored for libraries. 109 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 110 | #poetry.lock 111 | 112 | # pdm 113 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 114 | #pdm.lock 115 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 116 | # in version control. 117 | # https://pdm.fming.dev/latest/usage/project/#working-with-version-control 118 | .pdm.toml 119 | .pdm-python 120 | .pdm-build/ 121 | 122 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 123 | __pypackages__/ 124 | 125 | # Celery stuff 126 | celerybeat-schedule 127 | celerybeat.pid 128 | 129 | # SageMath parsed files 130 | *.sage.py 131 | 132 | # Environments 133 | .env 134 | .venv 135 | env/ 136 | venv/ 137 | ENV/ 138 | env.bak/ 139 | venv.bak/ 140 | 141 | # Spyder project settings 142 | .spyderproject 143 | .spyproject 144 | 145 | # Rope project settings 146 | .ropeproject 147 | 148 | # mkdocs documentation 149 | /site 150 | 151 | # mypy 152 | .mypy_cache/ 153 | .dmypy.json 154 | dmypy.json 155 | 156 | # Pyre type checker 157 | .pyre/ 158 | 159 | # pytype static type analyzer 160 | .pytype/ 161 | 162 | # Cython debug symbols 163 | cython_debug/ 164 | 165 | # PyCharm 166 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 167 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 168 | # and can be added to the global gitignore or merged into this file. For a more nuclear 169 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 170 | #.idea/ 171 | 172 | # PyPI configuration file 173 | .pypirc 174 | -------------------------------------------------------------------------------- /data/text_chunks_and_embeddings_df.csv: -------------------------------------------------------------------------------- 1 | page_number,sentence_chunk,chunk_char_count,chunk_word_count,chunk_token_count,embedding 2 | -41,"Aditya Ghai Email: adityaghailbdrp1@gmail.com LinkedIn: https://www.linkedin.com/in/aditya-ghai/ Github: https://github.com/adityaghai07 Education • Indian Institute Of Information Technology Jabalpur Jabalpur, India Bachelor of Technology - Computer Science and Engineering; GPA: 9.5 May 2022 - May 2026 Courses: Operating Systems, Data Structures, Analysis Of Algorithms, Artificial Intelligence, Machine Learning, Networking, Databases Skills and Competencies Document • Languages: Python,C++, SQL, C • Frameworks: scikit-learn, NLTK, SpaCy, TensorFlow, Keras, Flask , HuggingFace , Pytorch • Tools: GIT, PostgreSQL, MySQL • Platforms: Linux, Windows, Arduino, Streamlit Experience • Bezu AI Remote Machine Learning Intern Jun 2024 - Present ◦ Cost Reduction: Reduced overall cost by 600% by switching to LLaMA3 70b.◦ Model Fine-Tuning: Finetuned base model on web-scrapped data and deployed for inference on replicate.◦ Python Backend: Moved the whatsapp app architecture from nodejs to python. •Zep Analytics Remote Data Science Intern Dec 2023 - Jan 2024 ◦ Real World Client Projects: Built AI/ML based solutions utilizing diverse tech stacks, including Flask, Vector DB, and Hugging Face Pipelines, to deliver tailored solutions.◦ Insurance Claim Automation: Used NLTK, cosine similarities, and LangChain to classify claims.◦ LLM Based Research: Tried and tested various LLMs for specific purposes including LLaMA, Mistral, and RoBERTa. Projects • AI Badminton Game Coach - https://github.com/Team-Phoenix-Force/ShuttleSensei April 2024 • Implemented ActionFormer and Fast Slow Network for TAL research paper to build an enhanced model. •The model takes badminton playing videos as input, providing insights about shot selection graphically and detailed descriptions of each rally. •Achieved a mean average precision of 91, outperforming the previous model’s 78. •SureBot - https://mainpy-ckn2aqdwyvr3n4pvep6koz.streamlit.app/ Oct 2023 • Developed and deployed a GenAI-based QnA Chatbot with a Streamlit UI. •",2016,269,504.0,"tensor([ 5.2253e-02, 3.7902e-02, -5.0775e-02, 1.4242e-02, -1.9388e-02, 3 | -1.4117e-02, 6.5850e-03, 2.0134e-02, 3.4354e-02, -3.6530e-02, 4 | 3.6057e-02, 3.5734e-02, -3.4278e-03, 1.3651e-01, 5.7826e-02, 5 | -6.3743e-02, 7.6529e-03, -1.1699e-02, -1.6944e-03, 1.5640e-03, 6 | -3.6334e-02, 1.0422e-03, -2.9204e-02, 5.6146e-02, -1.2508e-02, 7 | -2.2816e-02, -2.7508e-02, 1.3091e-02, -2.1453e-02, -4.9158e-02, 8 | 9.5282e-03, -2.9049e-02, -2.3014e-02, 2.7556e-02, 2.7699e-06, 9 | -6.0659e-02, -1.0545e-02, -8.0958e-03, 7.2880e-04, 4.7677e-03, 10 | 4.7767e-02, 3.7710e-02, 1.0702e-02, 3.2226e-02, -3.9873e-02, 11 | 4.1033e-02, 5.9093e-02, 2.4393e-03, 4.3669e-02, 6.4440e-02, 12 | -6.4390e-03, -7.6793e-03, 3.5793e-02, 8.5593e-03, 8.9721e-03, 13 | -5.6618e-02, -4.6583e-03, 1.5535e-02, 2.9722e-02, -6.1542e-02, 14 | -6.2533e-03, -8.6183e-03, 1.5473e-02, 1.2575e-02, 6.1379e-02, 15 | 5.2776e-02, -1.1410e-02, -3.3488e-02, -1.8732e-02, 9.2174e-03, 16 | -1.7006e-02, -2.7127e-02, 3.1816e-02, 6.4717e-03, -1.4651e-02, 17 | -8.1083e-03, -2.6760e-02, 3.3707e-02, -1.1791e-02, -8.8827e-04, 18 | -5.8842e-03, 1.6136e-02, -2.8991e-02, 1.4095e-02, 1.0615e-03, 19 | 4.5577e-02, -1.4160e-02, 7.5310e-03, -1.8344e-02, -1.4826e-02, 20 | 8.7710e-02, -8.3164e-02, 3.6128e-02, 5.4394e-02, -4.0879e-02, 21 | -4.4943e-02, 1.1274e-02, -4.6551e-02, 2.1804e-02, -4.3918e-02, 22 | 5.0312e-02, 2.3083e-02, 1.4098e-02, 2.6493e-02, -6.2663e-03, 23 | 4.6677e-02, 7.9677e-05, 5.8358e-03, -1.8537e-02, 3.2760e-02, 24 | -4.2648e-02, 7.2491e-03, 1.2991e-02, 5.6444e-02, -7.1101e-03, 25 | 1.9750e-02, -8.2908e-02, 5.5783e-02, -8.6585e-03, 2.3280e-02, 26 | 1.6684e-02, 3.5996e-02, 2.3835e-02, 1.5469e-02, -4.9008e-02, 27 | -5.0290e-02, -5.6158e-02, 3.5261e-02, 2.3442e-02, -5.4480e-02, 28 | 1.8806e-02, 1.0719e-02, -2.7931e-02, -3.1301e-02, 2.9234e-02, 29 | 7.0061e-02, 3.7499e-02, 2.9523e-03, -2.9843e-02, -3.7655e-02, 30 | 3.3294e-02, -6.6862e-02, -5.0516e-02, -5.6640e-02, -1.2912e-02, 31 | -4.5565e-02, -3.0317e-02, -2.2799e-02, -1.4651e-02, -3.3717e-03, 32 | -8.1227e-03, 4.9636e-02, -7.5406e-04, 2.6559e-02, 4.5120e-02, 33 | 2.8063e-02, 1.0702e-02, 3.5323e-02, 8.7626e-03, 2.8350e-02, 34 | 4.1447e-02, -1.9492e-02, 5.0416e-02, 2.8406e-02, -1.9919e-02, 35 | -4.0476e-02, -9.0168e-03, -5.3649e-03, -2.3938e-02, 1.1084e-02, 36 | -1.6206e-02, 2.7425e-03, -9.5441e-03, 4.3980e-02, 7.3884e-02, 37 | 6.3665e-02, 2.2185e-02, 1.1511e-02, 4.3880e-03, -1.2201e-02, 38 | 2.5829e-02, -6.9782e-02, -3.3458e-02, 6.2793e-02, -1.6469e-02, 39 | 5.2371e-03, -4.4374e-02, 1.0037e-01, -3.0951e-02, -4.6247e-02, 40 | -3.2228e-03, -5.1248e-02, -5.3578e-02, 2.1808e-02, 5.2484e-02, 41 | -3.0730e-03, -1.9164e-02, -2.5021e-02, -6.8189e-03, -4.5981e-02, 42 | -4.0282e-02, -9.7625e-02, 3.4193e-02, 2.2618e-02, 2.2520e-03, 43 | -7.3060e-02, -4.5125e-02, 2.8897e-03, -6.4234e-02, -9.8609e-03, 44 | 3.4387e-02, 1.8892e-03, 2.5503e-02, -7.9256e-03, -1.6270e-02, 45 | 2.5833e-02, 1.5508e-02, -1.1991e-02, 9.3167e-03, 5.7477e-02, 46 | -3.0698e-02, 1.2132e-02, -3.0253e-02, 3.3699e-02, -3.5091e-02, 47 | -2.7849e-02, 6.3700e-03, 1.0585e-02, 4.3249e-02, 5.0442e-02, 48 | 2.0400e-02, -2.4268e-02, 6.6618e-02, -4.0655e-03, -2.4755e-02, 49 | 2.7501e-02, 7.9975e-02, 2.1119e-02, 1.3041e-02, -2.9734e-02, 50 | 1.9539e-02, 3.8867e-02, -5.3898e-02, -1.5354e-02, 9.8932e-03, 51 | 3.5440e-02, 3.5771e-02, 2.2631e-03, 3.9940e-02, -5.3996e-03, 52 | 3.5894e-02, 1.2036e-02, 1.6180e-02, 5.5223e-02, -2.3092e-02, 53 | -4.4709e-02, -5.7302e-02, 2.9288e-02, -9.6392e-02, 1.4230e-02, 54 | 1.2087e-02, -6.6577e-02, 1.2323e-02, 3.8678e-04, 6.4468e-02, 55 | -7.2148e-02, 3.9402e-02, -7.2993e-02, 1.2817e-02, 5.3872e-03, 56 | 2.6714e-02, -8.6647e-04, 2.5854e-02, -2.8859e-02, -3.2305e-02, 57 | 1.3654e-02, 5.4373e-03, 2.2948e-02, -3.4821e-02, 5.6490e-02, 58 | -8.1759e-03, -4.7786e-02, -2.3951e-02, 2.7003e-03, -2.1718e-02, 59 | 6.3392e-02, 5.7253e-02, -6.4294e-02, -4.2315e-02, -7.4243e-03, 60 | -6.6571e-02, -9.3235e-03, 1.4860e-02, -5.5096e-02, -4.8012e-02, 61 | 2.1440e-02, -4.5200e-02, 7.7043e-02, -2.6987e-02, 1.9199e-02, 62 | 1.6057e-02, -5.0316e-03, 4.2231e-03, 4.8693e-03, -5.0399e-03, 63 | -3.8298e-02, 8.1643e-03, 5.5265e-03, 8.3579e-03, -1.3761e-02, 64 | -2.2765e-02, -9.5846e-03, 1.3310e-02, 1.6231e-02, 2.2935e-02, 65 | -1.2550e-02, -3.4152e-02, 8.2081e-04, -1.0382e-02, 5.1911e-02, 66 | 1.2229e-03, -4.8552e-02, 4.5111e-02, 1.5521e-02, 2.9108e-02, 67 | -4.1020e-02, -1.2215e-01, -3.1036e-02, 7.0328e-02, -1.1423e-02, 68 | 2.7629e-02, -2.3594e-02, -4.3411e-02, -1.2861e-02, -4.2094e-03, 69 | -1.2373e-02, -3.4384e-02, -6.3992e-02, -2.1923e-02, -2.8480e-03, 70 | -1.3413e-02, -3.8974e-02, -2.0474e-02, 2.6655e-03, -2.7348e-02, 71 | -2.3571e-02, -2.5969e-02, -1.3506e-02, -3.5087e-02, -1.1072e-02, 72 | 2.6867e-02, 2.9969e-02, -3.5305e-03, -1.7793e-02, 1.1197e-02, 73 | -9.3608e-03, 1.6354e-02, 2.1748e-02, -1.7152e-02, 6.3343e-04, 74 | 3.1431e-02, 3.6431e-02, 6.0475e-02, -5.6101e-03, -3.3351e-02, 75 | 2.8304e-02, 1.8341e-02, -6.5995e-02, -5.0339e-02, 4.9936e-02, 76 | 3.9283e-02, -4.2654e-02, 1.8191e-02, 5.6591e-02, 2.5501e-03, 77 | -3.3199e-02, 1.5879e-02, -3.6411e-02, -4.0826e-02, 2.7781e-02, 78 | 4.5704e-02, -8.5495e-02, 2.1170e-02, 3.2942e-03, 1.4863e-02, 79 | -5.2198e-02, -3.2694e-02, -2.7659e-02, -8.2266e-02, 5.2143e-02, 80 | -5.8061e-03, -2.6246e-02, -7.5293e-02, -3.6388e-02, -4.5533e-03, 81 | -2.3964e-02, -2.7104e-02, 1.9790e-02, -6.3258e-03, 1.9226e-02, 82 | 2.7935e-02, -7.0032e-02, 2.3788e-02, 1.7930e-02, -6.2162e-02, 83 | 3.5624e-03, 5.5313e-02, 4.9498e-02, -3.2868e-02, -1.8230e-02, 84 | 2.1696e-03, 2.6243e-02, 3.0534e-02, -5.0949e-03, 7.6315e-02, 85 | -1.9853e-02, -3.0960e-04, 7.0427e-03, 3.6396e-02, -4.2648e-02, 86 | 1.5045e-02, 5.9278e-02, 8.1309e-02, -2.5016e-02, 2.6052e-02, 87 | -4.6728e-02, -2.0617e-02, 3.0504e-02, 1.3463e-02, -5.6908e-03, 88 | -1.9419e-02, -5.7439e-02, 6.7217e-04, 2.7282e-02, 7.3011e-03, 89 | -2.7147e-02, -3.0141e-03, -2.7558e-02, -7.0502e-02, -3.6146e-02, 90 | -3.7740e-02, 1.3434e-02, 2.3242e-02, 1.7559e-02, 5.6153e-02, 91 | -2.9774e-03, -1.2364e-03, -4.1351e-02, -3.5517e-02, 8.1435e-03, 92 | 5.3113e-02, -4.5102e-02, 4.9539e-03, 3.7753e-02, -4.4856e-02, 93 | -5.3356e-02, -2.8128e-02, -4.0512e-02, -1.7961e-02, -4.5103e-03, 94 | 6.9640e-02, 4.2844e-02, -1.6461e-02, 1.1799e-03, -3.4221e-02, 95 | 1.5868e-02, 5.1794e-02, -2.1795e-02, 3.4099e-02, -4.0602e-03, 96 | -3.9558e-03, -3.8442e-03, -4.9877e-04, -2.6744e-02, 3.2620e-02, 97 | 1.1016e-03, -2.5855e-02, 2.4717e-03, -1.4617e-02, -1.3187e-02, 98 | 7.9885e-02, 5.6459e-02, 6.6384e-03, -9.8827e-02, 2.1607e-02, 99 | 3.5500e-02, 1.5903e-02, 1.9445e-02, -4.0909e-02, -3.6952e-02, 100 | 2.6302e-02, 4.1104e-02, 2.4170e-02, -2.2966e-02, 4.6304e-02, 101 | -7.8570e-03, -6.7968e-02, 6.8994e-02, -1.7347e-03, 7.1680e-02, 102 | -2.2322e-03, -8.9022e-03, 2.1981e-02, -5.8760e-03, -1.4707e-03, 103 | 3.1837e-02, -2.7907e-02, -6.2625e-04, -2.0216e-02, 8.3652e-03, 104 | -7.6902e-03, 3.0136e-02, -1.5938e-02, -6.3399e-02, 1.1258e-02, 105 | 3.0942e-02, 9.1838e-02, 1.4043e-02, -1.9215e-03, -4.5743e-02, 106 | 1.4699e-02, -3.3892e-03, 2.7297e-02, -4.7706e-02, 3.5913e-04, 107 | -3.3765e-02, -6.6214e-03, -4.2418e-02, 2.7227e-02, 3.8669e-02, 108 | 3.1432e-02, 2.5553e-02, -2.4665e-02, -3.3152e-02, -2.2289e-02, 109 | 7.3787e-03, 4.7492e-02, 3.8890e-02, 1.4130e-02, -3.2350e-03, 110 | -4.3121e-02, -3.8809e-02, 5.4804e-02, -6.1809e-04, -3.0211e-03, 111 | -3.7382e-02, 3.7398e-02, 2.5061e-02, 3.2997e-02, 1.5277e-02, 112 | -1.8809e-03, -6.1429e-03, -5.4886e-02, -4.0141e-03, 1.2215e-04, 113 | -7.6235e-33, 9.3258e-03, -6.1104e-02, 2.1636e-02, 1.8899e-02, 114 | -6.6076e-02, 1.0225e-02, -2.6631e-02, -4.8332e-02, -1.6051e-02, 115 | -1.0556e-02, -3.9165e-02, 3.9200e-02, 2.8263e-02, -6.2868e-03, 116 | 6.6086e-02, -2.2586e-02, 5.6006e-04, -3.2328e-04, -5.2558e-03, 117 | 1.2105e-02, -1.0095e-02, 5.3883e-02, 3.1827e-02, -7.2737e-02, 118 | -8.1511e-03, 2.2132e-02, -3.4141e-02, 2.0918e-03, -5.7955e-02, 119 | 2.6130e-02, 5.6476e-03, -2.1616e-03, 1.3001e-02, 9.6385e-03, 120 | 1.9931e-02, -3.8110e-02, -5.0939e-02, -2.0014e-02, -4.3372e-02, 121 | 3.1022e-02, -1.2749e-02, -7.0102e-03, 8.5609e-02, -1.1615e-02, 122 | -5.0093e-02, -1.9698e-02, 4.7517e-02, -2.6677e-02, -5.6639e-03, 123 | -4.1323e-02, -2.9542e-02, 1.8523e-02, -3.5431e-02, 4.8917e-02, 124 | 2.1063e-02, 4.5826e-03, -1.0459e-02, 4.0387e-03, -6.1078e-02, 125 | 2.9629e-02, -4.7041e-02, 2.2476e-02, 4.4759e-02, -1.2235e-02, 126 | -1.9805e-03, 2.0461e-02, 5.9619e-02, -5.6603e-02, -1.7818e-02, 127 | -3.0250e-02, -4.2424e-02, 1.1949e-01, 1.7847e-02, -4.3445e-02, 128 | -6.4692e-03, -9.4971e-02, -6.7904e-02, 4.7696e-02, 8.6945e-02, 129 | 2.8062e-02, -5.8805e-02, 1.7004e-02, -4.1218e-02, 1.3155e-02, 130 | 6.3652e-02, -5.2668e-02, -1.8422e-02, 7.3936e-03, 7.8938e-03, 131 | -2.1937e-02, 7.2459e-03, 2.9833e-02, -2.8693e-02, -1.3492e-02, 132 | 3.7190e-02, 6.2691e-03, 2.0875e-02, 5.4545e-02, 1.7480e-02, 133 | -7.2746e-03, -1.0891e-02, -2.7163e-02, -7.2703e-02, 1.8853e-02, 134 | 5.7652e-02, 3.4373e-03, 6.5160e-03, 4.9298e-02, -4.6772e-02, 135 | 9.9864e-04, 1.9724e-03, 2.6055e-02, 3.8535e-02, 2.7044e-02, 136 | 9.6878e-03, 3.8744e-03, 1.5659e-02, 2.7981e-02, 2.7130e-02, 137 | 3.5974e-03, -2.9299e-02, -9.1646e-04, 1.1189e-03, -1.5594e-02, 138 | -5.9093e-02, -7.8394e-03, -5.0211e-02, 8.9011e-03, 6.0120e-03, 139 | -5.5135e-02, -2.7949e-02, -6.3954e-03, 3.5518e-07, -8.0256e-03, 140 | 1.0175e-01, -2.9224e-02, -7.4111e-03, -7.9577e-03, 2.9602e-02, 141 | -4.3669e-02, 6.6280e-03, 7.2031e-03, 4.3207e-02, 2.2862e-02, 142 | -1.0755e-02, 6.1938e-02, -7.3438e-03, -4.2848e-02, -3.5323e-02, 143 | -5.1709e-02, -1.9880e-02, -6.8045e-02, 5.1286e-02, 1.7850e-02, 144 | 5.8756e-02, 8.3669e-02, -2.1707e-02, 4.2522e-02, -5.5161e-02, 145 | -2.3008e-02, -7.0169e-03, 5.3551e-02, 2.8273e-02, 3.2832e-02, 146 | -1.2771e-02, -7.3080e-03, 1.0683e-02, -2.8564e-02, -4.1945e-03, 147 | 2.0991e-02, 4.1830e-02, -6.2615e-03, 6.5081e-02, -1.4022e-02, 148 | -1.0626e-02, 1.7307e-02, -4.5002e-02, 6.4166e-02, 4.1324e-02, 149 | -5.3564e-02, -1.8697e-02, -3.8730e-02, -5.2096e-02, 2.2700e-02, 150 | 1.8633e-02, 1.4336e-02, 3.1846e-03, -1.7977e-02, -4.1104e-02, 151 | -3.4285e-02, -2.2768e-02, 1.3406e-02, 2.7660e-03, -2.3765e-02, 152 | -2.9846e-02, 4.2860e-03, 6.7689e-02, 5.9859e-02, -7.5982e-02, 153 | -3.5725e-03, 4.1308e-34, -1.2289e-02, 4.7237e-03, -9.5995e-04, 154 | 3.2041e-02, 7.9918e-03, -4.1524e-03, 2.2347e-02, 6.0589e-03, 155 | 2.3287e-02, -1.6620e-02, -4.1732e-02])" 156 | -41,"The chatbot effectively utilizes user-provided trusted sources, ensuring the use of accurate and up-to-date information to generate responses. •It demonstrates a higher level of precision when compared to existing LLMs such as Bard and ChatGPT. •Article Filter & Summarizer- https://github.com/adityaghai07/Article-Filter-Summerizer Feb 2024 • Developed an article searcher and summarizer leveraging The General News Dataset from Kaggle. •Utilized collaborative filtering techniques including tokenization, stop-word removal, stemming, and TF-IDF vectorization for retrieving relevant articles. •Employed Hugging Face’s pipelines with the Facebook BART model for summarization. Honors and Awards • MLH HackByte 2.0 Grand Winner - Built an AI Based Game Coach achieving a mean average precision of 91, providing detailed graphical and point-by-point analysis. •Smart India Hackathon Finalist 2023 - Built Interactive VoiceBot of Chacha Chaudhary for Ministry Of Jal Shakti. •IIT Roorkee ThermaOracle Grand Winner - Temperature prediction modelling competition where we achieved a R2 Score of 0.91. •AI BioInnovate Challenge IIT Jodhpur Winner - Built a Robust Computationally Efficient Clustering Ensemble for the MOSES Dataset, achieving a silhouette score of 0.72. •AnalyticaX IIT Indore Winner - Case Study based EDA and ML Competition for a vaccination dataset where we showcased a benchmarking 0.872 10-Fold Stratified Cross-Val ROC-AUC Score.",1447,198,361.75,"tensor([ 7.2496e-02, 2.4294e-02, -4.4788e-03, -1.3224e-03, -1.1778e-02, 157 | -4.2749e-03, 2.2374e-03, 1.1657e-02, 7.4110e-02, -1.9219e-02, 158 | 6.6070e-03, 5.0010e-02, -2.0995e-02, 9.0162e-02, 1.8094e-03, 159 | -8.6445e-02, 4.4035e-02, -3.9326e-03, 1.8487e-02, -7.3792e-03, 160 | 4.8035e-03, 2.2849e-02, -4.4586e-02, 7.2120e-02, -8.9545e-03, 161 | -8.1204e-03, -1.0909e-02, 1.9378e-02, 4.3495e-03, -6.6707e-02, 162 | 2.9577e-03, -2.5473e-02, -9.5228e-03, 3.2395e-02, 2.6067e-06, 163 | -4.0221e-02, -2.8199e-02, 7.9286e-03, -3.7938e-02, -4.9610e-02, 164 | 7.6692e-02, 2.6958e-02, 1.0453e-02, 3.7984e-02, -5.2713e-02, 165 | 3.5857e-02, 5.7844e-02, 2.4840e-02, 6.3386e-02, 8.2542e-02, 166 | -6.9995e-03, 1.5179e-03, 3.3745e-02, 1.6618e-02, 6.0379e-03, 167 | -1.9597e-02, -3.8551e-02, -1.0700e-03, 6.7405e-02, -1.1335e-02, 168 | 9.1677e-03, 3.2533e-02, -2.4105e-03, -1.4874e-02, 5.3229e-02, 169 | 3.7998e-02, -7.3718e-02, -4.0020e-02, 1.3301e-02, 4.5674e-02, 170 | 2.0191e-02, -3.0508e-02, 3.1541e-02, 3.3029e-02, 8.4490e-03, 171 | 3.7201e-03, -5.3715e-02, 1.4214e-02, -1.5878e-02, 9.9193e-03, 172 | -1.3757e-03, 2.0703e-02, -2.4594e-02, 1.3657e-02, 4.4643e-02, 173 | 4.0598e-02, 8.6468e-03, 3.6056e-03, -4.2786e-02, 2.0012e-02, 174 | 4.9228e-02, -6.4366e-02, 2.3847e-02, 6.4916e-02, -5.6223e-02, 175 | -2.9821e-02, -7.0920e-03, -2.0764e-02, 2.3507e-02, -5.6103e-02, 176 | -2.8083e-02, 2.5069e-02, 1.8308e-02, 6.7831e-02, -2.0655e-03, 177 | 2.8537e-02, 2.2238e-02, 6.4653e-02, -6.7245e-03, -1.8963e-02, 178 | -1.4391e-02, -3.7156e-03, 9.6282e-03, 8.1795e-02, -3.3923e-03, 179 | 1.8100e-03, -1.0041e-01, 1.2903e-02, -7.8423e-03, 1.2942e-02, 180 | 2.6187e-02, 4.5168e-02, -2.2538e-02, 1.6527e-02, -1.6905e-02, 181 | -2.8460e-02, -6.1299e-02, 2.7754e-03, 2.3256e-02, -5.0922e-02, 182 | -1.3054e-02, 9.1590e-03, 1.0181e-02, -1.3380e-02, 7.4556e-03, 183 | 9.3606e-02, -6.5662e-03, -3.3375e-02, 1.2249e-02, -3.7812e-03, 184 | 1.2164e-02, -5.3202e-02, -3.4305e-02, -5.7812e-02, 5.6681e-02, 185 | -1.5193e-02, -8.5760e-03, -1.3595e-02, 8.6838e-05, 1.9738e-03, 186 | -2.4979e-02, 4.1154e-02, -2.2836e-02, -2.1936e-02, 7.0033e-02, 187 | 3.8462e-02, 5.9819e-04, 5.2439e-02, 9.8128e-03, 4.3295e-02, 188 | 5.1506e-02, -3.1716e-03, 1.7975e-02, 9.8291e-03, 5.2241e-03, 189 | -3.9121e-02, 2.1765e-02, -1.8272e-02, -4.8795e-02, 2.7153e-02, 190 | -3.6367e-02, 2.6585e-02, -1.4856e-02, 4.3026e-02, 5.9429e-02, 191 | 6.7580e-02, -6.1078e-04, -5.1805e-03, -3.1606e-02, 4.3941e-03, 192 | 6.5749e-02, -1.8595e-02, -1.7650e-02, 6.7091e-02, -6.4854e-02, 193 | -3.2326e-02, 3.3549e-02, 5.0924e-02, -2.0311e-02, -4.9213e-02, 194 | 3.6989e-02, -2.2454e-02, 2.3308e-02, 2.5188e-03, 4.8714e-02, 195 | -2.8219e-02, -1.6653e-02, -4.9318e-02, 1.8412e-02, -6.7681e-02, 196 | -1.3400e-02, -7.2427e-02, 2.8533e-02, 5.2939e-02, 5.7010e-02, 197 | -5.5359e-02, -3.5122e-02, -1.2346e-02, -3.2447e-02, 9.2784e-03, 198 | 1.8417e-03, -1.0343e-02, -1.5058e-02, -2.0602e-03, -1.2403e-02, 199 | 2.3881e-02, 1.6617e-03, -2.1229e-02, 1.8289e-02, 6.4465e-02, 200 | -1.9337e-02, 5.3587e-02, 3.5796e-03, 2.6717e-02, 9.6891e-05, 201 | 1.8632e-02, -1.2274e-02, -3.3971e-03, 6.4044e-02, 6.9391e-02, 202 | 1.0195e-02, -1.3361e-03, 6.3973e-02, -2.4976e-02, -6.9734e-03, 203 | 1.9659e-02, 3.1241e-02, -3.8566e-03, 1.3334e-02, -7.0539e-02, 204 | 8.4983e-03, 7.0456e-02, -7.6649e-03, -1.5249e-02, 3.0564e-02, 205 | -2.4132e-02, 3.8240e-02, -2.1471e-03, 1.5403e-02, -3.4209e-02, 206 | 1.0224e-02, -2.2038e-02, 2.9988e-02, 4.0102e-02, -3.1444e-02, 207 | 1.5737e-02, -3.2285e-02, -1.8676e-02, -4.8333e-02, -4.9017e-03, 208 | 3.7354e-02, 6.0177e-03, -1.0800e-02, 2.5678e-02, -2.9725e-04, 209 | -7.5906e-02, -1.9484e-02, -1.1436e-01, -7.0522e-04, 8.5289e-03, 210 | -1.7070e-02, 2.0186e-02, 2.1267e-02, 1.5138e-03, -2.6638e-02, 211 | -2.5954e-02, 3.2386e-03, 3.2813e-02, -1.7652e-02, 4.8718e-02, 212 | -1.4291e-02, 2.4582e-02, -6.5929e-02, 1.3733e-02, -4.2300e-02, 213 | 4.1911e-02, 7.3755e-02, -5.9139e-02, -6.4702e-03, -7.6668e-03, 214 | -5.2199e-02, -4.8067e-03, -2.8354e-03, -6.1357e-02, 2.3027e-02, 215 | -1.5566e-02, -1.5214e-02, 9.7361e-02, 4.9906e-02, 3.6366e-03, 216 | 1.1469e-02, 3.9308e-04, -5.9784e-02, 1.5687e-02, 2.7416e-04, 217 | 2.0548e-02, -1.1970e-03, -1.2137e-02, 1.5668e-02, -1.6533e-02, 218 | 2.0230e-02, 1.3729e-02, -3.7405e-02, 5.3813e-02, -1.2693e-02, 219 | -3.7095e-02, -4.2865e-02, 6.9702e-04, -2.8471e-02, 1.5479e-02, 220 | -1.0020e-02, -2.0831e-02, 5.4499e-02, -5.4350e-04, 1.6604e-02, 221 | -5.2894e-02, -5.5203e-02, -2.9194e-02, 3.0467e-02, -2.0258e-02, 222 | 2.9710e-02, -5.7862e-02, -1.3696e-02, -3.7693e-02, -1.3484e-02, 223 | 3.5238e-03, -8.8822e-02, 4.6371e-03, -5.8929e-03, -1.6859e-02, 224 | -7.6116e-03, -2.4496e-02, -2.6366e-02, -6.3043e-02, -4.3296e-02, 225 | -2.5885e-02, 5.5227e-02, -3.7332e-02, -5.9856e-02, 4.9288e-03, 226 | 4.4136e-02, 1.9259e-02, -2.2945e-02, -8.4924e-03, 3.1865e-02, 227 | -6.5287e-03, 4.7110e-02, 2.2896e-02, 4.8811e-03, 3.4138e-02, 228 | 4.4929e-02, 7.6278e-02, 4.6641e-02, -3.5988e-02, -1.1507e-02, 229 | -1.0729e-02, 2.4346e-02, -2.5702e-02, -1.4130e-02, -9.9103e-03, 230 | 8.8706e-02, -2.7082e-02, 3.6899e-02, 9.5722e-02, 1.5733e-02, 231 | -5.1580e-02, -1.0115e-02, -2.6117e-02, 1.2149e-03, 2.3704e-03, 232 | 4.6247e-02, -8.4408e-02, -4.8198e-03, 3.8243e-02, 3.3959e-02, 233 | -2.5713e-02, -6.3298e-02, -1.1066e-02, -7.5020e-02, 2.3649e-02, 234 | 1.0248e-02, -6.3378e-02, -3.7233e-02, -7.9042e-02, -6.6657e-03, 235 | -2.3918e-02, -3.2069e-02, 1.3244e-02, -1.5760e-03, 6.0069e-03, 236 | 1.1572e-02, -7.7495e-02, 2.1030e-02, 2.7785e-02, -1.6068e-02, 237 | 6.7466e-02, 7.7596e-02, 5.3952e-02, -7.6548e-03, 3.7107e-02, 238 | -2.2825e-02, 4.4236e-02, -1.3653e-02, -1.2555e-02, 8.3307e-02, 239 | -4.0058e-02, -7.0553e-03, -4.4192e-02, 3.0088e-02, 1.6362e-02, 240 | 9.2486e-03, 4.2528e-02, 3.5776e-02, -4.8758e-03, 2.6772e-02, 241 | -6.5518e-02, 1.7703e-02, -6.4598e-04, 3.5395e-02, 1.8889e-02, 242 | -2.2107e-02, -2.3841e-02, -3.0856e-02, 1.6781e-02, 4.8234e-04, 243 | -6.8758e-02, -2.8604e-02, -5.0470e-02, -6.0705e-02, -9.7666e-02, 244 | -5.5586e-02, 5.1937e-02, 5.5224e-03, 3.3799e-03, 4.1086e-03, 245 | -2.4680e-02, 2.6921e-02, -2.2895e-02, -3.5842e-02, -1.8178e-02, 246 | 2.1038e-02, -3.9388e-02, -1.4954e-02, 3.8442e-02, -3.1298e-02, 247 | -1.6555e-02, 5.5136e-02, -2.3068e-02, -3.6859e-02, 5.6587e-03, 248 | 6.4767e-02, 2.1724e-02, 3.2750e-02, -1.9933e-02, -3.9016e-02, 249 | 5.5840e-02, 4.8007e-02, -2.0782e-02, -2.3074e-03, -7.2697e-03, 250 | 5.0491e-02, 7.2255e-04, -1.3473e-03, -6.4141e-02, 2.1064e-02, 251 | -2.3177e-02, 6.6289e-03, 1.3494e-03, -1.4711e-02, 3.4652e-02, 252 | 7.2295e-02, 2.6973e-02, -1.1762e-02, -2.2987e-02, 4.4483e-03, 253 | 9.3050e-03, -4.1865e-02, -1.9819e-02, -2.8355e-02, -6.1361e-03, 254 | -2.4223e-02, -1.9092e-03, 1.6625e-02, 2.7636e-02, -2.8015e-02, 255 | 5.7274e-02, -5.8587e-02, 6.7991e-02, 1.1324e-02, 3.8586e-02, 256 | -8.7968e-03, 1.1967e-02, 2.6213e-03, 3.1226e-03, -1.6447e-03, 257 | 1.2423e-02, -3.5842e-02, 1.5137e-02, -1.1145e-02, -7.6284e-03, 258 | 2.6228e-02, 4.1378e-02, -9.7452e-02, -6.7650e-04, -2.9913e-02, 259 | 6.2838e-02, 5.2897e-02, 3.7008e-02, 2.8458e-02, -6.9785e-03, 260 | -7.3773e-03, -2.7135e-02, 1.4736e-02, -3.4390e-02, 8.8235e-03, 261 | -1.2432e-02, 5.1861e-03, -2.1334e-02, -2.1252e-02, 4.9326e-02, 262 | -4.0473e-02, 2.4575e-02, 5.4375e-02, -1.3977e-02, -4.4687e-02, 263 | -2.2319e-02, 4.6584e-02, 4.5594e-02, 1.1424e-02, -3.3664e-02, 264 | -1.6739e-02, -2.3633e-02, 1.8853e-02, -2.2106e-02, -8.0384e-03, 265 | -1.7163e-02, 2.5136e-02, 2.8155e-02, 8.7468e-03, 1.1654e-02, 266 | -4.8779e-02, -7.9870e-03, -3.3310e-02, -2.2961e-02, 1.4291e-02, 267 | -7.5692e-33, -2.5774e-02, -3.1938e-02, -4.7328e-03, -1.4124e-02, 268 | -5.0991e-02, 1.9408e-02, -4.6061e-02, 9.6740e-03, -2.8292e-02, 269 | 1.1760e-02, -6.7572e-02, 1.2943e-02, 1.3098e-02, -1.5271e-02, 270 | 4.4126e-02, -2.5755e-02, 3.2546e-02, -5.8698e-03, -2.4105e-02, 271 | 4.3816e-02, 1.8040e-02, 3.1698e-02, 3.4052e-02, -5.2021e-02, 272 | 2.9389e-02, 1.7742e-02, -2.0908e-02, -3.6740e-02, 1.8500e-02, 273 | 3.5567e-02, 8.4715e-04, 2.8920e-02, 4.8030e-03, 1.4836e-02, 274 | -4.4108e-03, -1.4736e-02, -7.2184e-02, -2.0204e-02, -1.8477e-02, 275 | 1.6197e-02, -2.7257e-02, -3.8050e-02, 4.3803e-02, -3.9811e-02, 276 | -3.0914e-02, -3.7665e-03, 3.7037e-02, -3.2157e-02, -1.6411e-02, 277 | -2.6917e-02, -8.3724e-03, 2.2705e-02, -5.4399e-02, 1.4163e-03, 278 | -7.5637e-04, 5.2884e-02, 1.1431e-02, 5.0913e-02, -5.9843e-02, 279 | 6.3938e-02, -4.8518e-02, 1.9738e-02, 4.6344e-02, -1.7405e-02, 280 | 1.2580e-02, 6.9832e-02, 5.0087e-02, -2.8096e-02, -5.0703e-02, 281 | -1.6820e-02, -1.5500e-02, 4.2657e-02, 6.5343e-02, 3.5617e-02, 282 | -1.9754e-02, -6.0972e-02, -5.8689e-02, 7.2728e-02, 5.4954e-02, 283 | 1.9449e-02, -2.4175e-02, 1.4949e-02, -6.4562e-02, 2.1279e-02, 284 | 2.6003e-02, 1.2391e-02, -2.6969e-02, -6.6516e-02, -5.8566e-03, 285 | -2.8985e-02, -4.2836e-02, -3.4821e-02, -1.5267e-02, -4.0705e-02, 286 | 5.8796e-02, 9.0376e-03, 2.8549e-02, 1.5770e-03, -4.0757e-03, 287 | -1.4089e-02, -6.4434e-03, -1.0549e-02, 7.0710e-03, 2.6294e-02, 288 | 2.9649e-02, -9.7314e-03, -2.4982e-02, 1.6313e-02, -4.3032e-02, 289 | -1.3857e-02, -9.4539e-03, 4.0342e-02, -1.1309e-02, -2.5896e-04, 290 | -9.0630e-03, -2.8710e-02, 4.2543e-03, 1.1984e-02, 1.2015e-02, 291 | 4.8476e-02, -9.7857e-03, 1.0558e-02, -9.3372e-03, -3.1963e-02, 292 | -3.4913e-02, 1.5636e-02, -6.3516e-02, 2.3830e-02, -1.8335e-02, 293 | -7.5496e-02, -2.6351e-02, -3.7070e-02, 3.4102e-07, 1.5403e-02, 294 | 1.0540e-01, -3.4724e-03, -3.5229e-03, -1.9213e-02, -1.0451e-02, 295 | -2.2622e-02, 1.1517e-02, 1.8667e-03, 3.7986e-02, 1.5674e-02, 296 | 2.4533e-02, 5.1339e-02, 3.8836e-02, -1.0913e-01, -5.9889e-02, 297 | -9.2882e-02, -4.7700e-02, -3.8674e-02, 5.8845e-03, 5.2773e-02, 298 | 6.0057e-02, 2.8218e-02, -9.4021e-04, 6.0716e-04, -2.5396e-02, 299 | -4.2479e-03, -8.9981e-03, -3.4498e-02, 2.5879e-02, 1.1388e-02, 300 | 1.0412e-02, 1.2945e-02, -1.1806e-02, -2.1131e-02, -2.5773e-02, 301 | 4.4644e-02, 3.7512e-02, -7.6727e-03, 4.9026e-03, 3.3406e-02, 302 | 2.3216e-02, -4.2301e-03, -5.5052e-02, 9.3251e-02, -8.0292e-03, 303 | -7.4680e-02, -4.4250e-02, -7.3343e-02, -1.8443e-02, 4.8568e-02, 304 | -1.4205e-02, -1.3791e-02, 1.6746e-02, -2.0803e-02, -1.0443e-02, 305 | 3.3848e-03, -3.1566e-02, -2.3463e-02, -6.4936e-02, -2.4884e-02, 306 | -1.1299e-01, -1.9407e-02, 2.1847e-02, -2.0438e-02, -1.8301e-02, 307 | 1.9066e-02, 3.2138e-34, 4.7752e-02, 1.6689e-02, 9.4749e-03, 308 | 1.6062e-02, 3.7359e-02, -2.7953e-04, 1.8792e-02, -5.8068e-03, 309 | 3.0990e-02, -3.0292e-02, -1.3688e-02])" 310 | --------------------------------------------------------------------------------