DEDUPED Hot AI repos, turned into use cases Get 5 a day

How to ask Constitution questions and get cited answers with PAKGOV RAG Project

Run the local demo and ask questions in English or Urdu, getting answers that cite the source page.

  • Top pick
  • Research
  • Intermediate
  • 45 minutes
  • From the README
  • Any agent

Who it is forA law student or policy researcher who needs a quick, page-cited answer about a Constitution of Pakistan article, in English or Urdu.

The problemFinding the right article and page in a long constitutional text takes time, and a general chatbot may invent an answer without a source.

The outcomeA running local web demo where each answer shows its status, its language, the answer text, and a [Source: Constitution.pdf p.X] citation, or says insufficient evidence.

What you need first

  • Python installed (the README lists Python 3.14)
  • Ability to clone the GitHub repository and run commands in a terminal
  • Internet access for the first download of the sentence-transformers embedding model (inferred from the model being loaded by name)
  • Constitution of Pakistan PDFs or the committed data files for the demo and evaluation

Steps

  1. Clone https://github.com/salikhussain71-code/PAKGOV-RAG-project and open the project folder.
  2. Run pip install streamlit sentence-transformers faiss-cpu rank_bm25.
  3. Run python -m streamlit run app/demo/app.py --server.port 8501.
  4. Open http://localhost:8501 in a browser.
  5. Ask What is Right to Information?, then Article 19A, then آرٹیکل 19 اے کیا ہے؟ and check each result's citation.

Prompt for your agent

Clone the repo salikhussain71-code/PAKGOV-RAG-project, install its demo requirements, and start app/demo/app.py on port 8501. Ask the demo the question <question in English or Urdu> and report the answer, its status, and its [Source: Constitution.pdf p.X] citation. Verify that the cited page actually contains the answer text before reporting it.

Caveat. The README reports that 13 of 50 evaluation questions missed at R@5, so some questions will return insufficient evidence even when the Constitution covers them.

Share: X LinkedIn Hacker News Email Copy link

Disclaimer

Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page