Back to feed
Dev.to
Dev.to
7/4/2026
# What Happens When You Try to Build a Lawyer for Someone Who Can't Afford One?

# What Happens When You Try to Build a Lawyer for Someone Who Can't Afford One?

Short summary

A Pakistani CS student built HAQ, an AI legal advisor using RAG to make Pakistani law accessible in Urdu and Arabic while preventing hallucinations. The system retrieves relevant legislation before answering. Technical lesson: batching API calls reduced processing 4,000+ legal chunks from 10+ hours to 7 minutes.

  • Built HAQ, an AI legal advisor for Pakistan using RAG to prevent hallucinations
  • System retrieves actual legislation before responding, ensuring cited sources
  • Optimization lesson: batching reduced 10+ hour pipeline to 7 minutes (87× faster)

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more