Hog RAGger Project Overview Hog RAGger is a Retrieval-Augmented Generation (RAG)…
- User
Hog RAGger
Project Overview
Hog RAGger is a Retrieval-Augmented Generation (RAG) pipeline designed to answer complex queries using a corpus of web-scraped articles. The project aims to develop an advanced RAG system capable of handling queries that require evidence from multiple documents and incorporate document metadata.
Dataset
The project uses the Hog RAGger Dataset, which consists of two main components:
-
Corpus.json: A collection of web-scraped articles containing:
- Title
- Author
- Source
- Publishing date
- Category
- Article URL
- Article body (text content)
-
Train.json: Contains 2556 queries processed by a state-of-the-art RAG pipeline, including:
- Queries requiring evidence from 2-4 documents
- Incorporation of document metadata
- Complex scenarios mimicking real-world RAG applications
Dataset link: Hog RAGger Dataset
Project Goal
The main objective is to develop a RAG pipeline that can:
- Answer user queries based on the provided corpus
- Utilize evidence from 2-4 documents per query
- Incorporate document metadata when necessary
- Format output to match the structure in train.json
Output Format
The pipeline should produce output in the following format:
{ "query": "User's question", "answer": "Generated answer based on evidence", "question_type": "inference_query", "evidence_list": [ { "title": "Article title", "author": "Author name", "url": "Article URL", "source": "Publication source", "category": "Article category", "published_at": "Publication date and time", "fact": "Extracted fact supporting the answer" }, // Additional evidence items... ] }Getting Started
(Include instructions for setting up the project, installing dependencies, and running the pipeline)
Usage
(Provide examples of how to use the RAG pipeline, including sample input and output)
Evaluation
(Describe how the performance of the RAG pipeline will be evaluated, potentially using metrics like accuracy, relevance, and completeness of answers)
Contributing
(Include guidelines for contributing to the project, if applicable)
COmplete this readame file based on this code import streamlit as st import json from typing import List, Dict, Any from sentence_transformers import SentenceTransformer from sklearn.metrics.pairwise import cosine_similarity import numpy as np from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
-
- Assistant
- User
Setup Instructions Install the necessary Python packages using pip:
pip install streamlit sentence-transformers transformers Clone the repository and navigate to the project directory. Ensure both corpus.json and train.json files are present in the project directory. Run the Streamlit app:
streamlit run app.py Replace app.py with the file name of your application script. In .md format
- Assistant
Setup Instructions
-
Install the necessary Python packages using pip:
pip install streamlit sentence-transformers transformers -
Clone the repository and navigate to the project directory.
-
Ensure both
corpus.jsonandtrain.jsonfiles are present in the project directory. -
Run the Streamlit app:
streamlit run app.py(Replace
app.pywith the file name of your application script.)
-
- User
write .md formate code
- Assistant
Certainly! Here's the setup instructions section in Markdown format:
## Setup Instructions 1. **Install the necessary Python packages using pip:** ```bash pip install streamlit sentence-transformers transformers-
Clone the repository and navigate to the project directory.
-
Ensure both
corpus.jsonandtrain.jsonfiles are present in the project directory. -
Run the Streamlit app:
streamlit run app.py(Replace
app.pywith the file name of your application script.)
You can copy this block and use it in your Markdown file to provide setup instructions for the project. -