MavSneha / articulus_rag

Home Page:https://rebase-ml.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Articulus-RAG

Develop - Prototype - Assess - Iterate

Python Versions Twitter Twitter

A platform for empowering transparency in media leverages AI-driven chatbots and content from journalism students to provide credible insights on global affairs, addressing gaps in Indian journalism. Inspired by my struggle to find concise information on India's stance on the Russia-Ukraine conflict during an interview preparation, and concerns about biased media coverage in regions like Manipur and Ladakh, the project aims to promote factual reporting and informed discourse. By offering accurate responses to complex queries and fostering a culture of fact-based reporting, it seeks to mitigate the prevalence of biased or incomplete information in Indian media, promoting transparency, accountability, and knowledge dissemination in the digital age.

Quick install

To install Articulus RAG i.e., a private repo, we can use Access Token of GitHub.

git clone https://<UPDATE-WITH-YOUR-TOKEN>@https://github.com/AryaChakraborty/articulus_rag

Create virtual environment

python3 -m venv env 
source env/bin/activate

or

virtualenv env
source env/bin/activate

Install all the packages within the virtual environment.

pip install -r requirements.txt

Install the beyondllm framework.

pip install -e .

API Documentation

/recommend Endpoint

  • Method: GET
  • Description: Retrieves ranked documents from the MongoDB collection.
  • Parameters: None
  • Response:
    • Success: Returns a JSON object containing the ranked documents.
    • Error: Returns a JSON object with an error message.

/rank Endpoint

  • Method: POST
  • Description: Retrieves ranked documents based on search keywords.
  • Parameters:
    • search_keywords: List of search keywords.
  • Request Body Example:
    {
      "search_keywords": ["keyword1", "keyword2", "keyword3"]
    }
  • Response:
    • Success: Returns a JSON object containing the ranked documents.
    • Error: Returns a JSON object with an error message.

/keyword_extractor Endpoint

  • Method: POST
  • Description: Extracts top 10 keywords from the given text.
  • Parameters:
    • text: Input text from which keywords need to be extracted.
  • Request Body Example:
    {
      "body": "Input text for keyword extraction."
    }
  • Response:
    • Success: Returns a JSON object containing the extracted keywords.
    • Error: Returns a JSON object with an error message.

/ai Endpoint

  • Method: POST
  • Description: Uses the enterprise RAG model to provide a response to the given question.
  • Parameters:
    • path: URL path or source of the content.
    • type: Type of content (e.g., "url", "youtube", etc.).
    • question: Question to be answered.
  • Request Body Example:
    {
      "path": "https://highonbugs.sbk2k1.in/sows",
      "type": "url",
      "question": "What is the blog talking about?"
    }
  • Response:
    • Success: Returns a JSON object containing the response from the enterprise RAG model.
    • Error: Returns a JSON object with an error message.

Acknowledgements

and the entire OpenSource community.

About

https://rebase-ml.vercel.app


Languages

Language:Python 100.0%