{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "salikhussain71-code-pakgov-rag-project--index-senate-rules-for-search",
 "repo": "salikhussain71-code/PAKGOV-RAG-project",
 "repo_url": "https://github.com/salikhussain71-code/PAKGOV-RAG-project",
 "repo_slug": "salikhussain71-code-pakgov-rag-project",
 "title": "Build a search index for Senate rules and acts",
 "page_title": "How to build a search index for Senate rules and acts with PAKGOV RAG Project",
 "summary": "Extract, chunk, and embed a folder of Senate PDFs into a FAISS index using the repo's pipeline commands.",
 "who": "A developer or legislative researcher who wants to search Senate rules, salary acts, or secretariat acts with the same pipeline used for the Constitution.",
 "problem": "Senate rules and acts are spread across many PDFs, and some are scanned images with no extractable text, so keyword search alone misses content.",
 "outcome": "A chunked JSONL file and a FAISS index with one vector per chunk, built from the Senate PDFs in data/raw/senate, ready for the retrieval pipeline.",
 "steps": [
  "Place the Senate PDFs in data/raw/senate/ inside the cloned repository.",
  "Run `python ingestion/extract.py --input data/raw/senate --output data/interim/senate_raw.jsonl`.",
  "Run `python ingestion/chunking/chunk_documents.py --input data/interim/senate_raw.jsonl --output data/processed/senate_chunks.jsonl`.",
  "Run `python retrieval/embed.py --input data/processed/senate_chunks.jsonl --output data/processed/senate_faiss`.",
  "Check the log for the line `Saved FAISS index with <N> vectors` and compare N with the chunk count. (inferred, check the README)"
 ],
 "agent_prompt": "In the cloned salikhussain71-code/PAKGOV-RAG-project repo, place the PDFs from <folder of Senate PDFs> in data/raw/senate/ and run the extract, chunk, and embed commands from the README in order. Report the number of chunks saved and the number of FAISS vectors saved. Verify that scanned PDFs that produced placeholder text are listed, since OCR is pending for them.",
 "agents": [
  "any"
 ],
 "difficulty": "Advanced",
 "time": "1 hour",
 "basis": "readme",
 "caveat": "The README's Senate run produced 1080 chunks, but two scanned PDFs yielded only placeholder text because OCR via Tesseract is still pending, so those documents are not searchable yet.",
 "category": "Research",
 "tags": [
  "Research"
 ],
 "lang": "python",
 "requirements": [
  "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"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/salikhussain71-code-pakgov-rag-project/index-senate-rules-for-search/",
 "md": "https://dedupedai.com/use-cases/salikhussain71-code-pakgov-rag-project/index-senate-rules-for-search/index.md",
 "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 hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/salikhussain71-code-pakgov-rag-project--index-senate-rules-for-search.json",
 "api_version": "v1"
}
