Back to portfolio

Legal answers that show their sources.

A team of six AI agents that answers questions about Dubai law, using RAG and GraphRAG on AWS Neptune. Every answer points to the articles behind it. Built during my AI engineer internship at E-tafakna.

Can a contract be ended early?

Yes, if both parties agree or if the contract allows it. Check the penalty clauses before you act.

Source 1Source 2Source 3

How one question travels

Router

Sends the question to the right specialist agent.

Graph search

Finds related laws and articles, such as 14 for one query.

Specialist

Drafts the answer from the laws it found.

Reviewer

Checks every citation before the answer goes out.

AWSNeptune & Bedrock
6specialised agents
PythonLangChain & FastAPI
GraphRAGAdvanced Retrieval

Project Architecture

The core challenge of E-tafakna was building a system that lawyers could trust. Standard RAG (Vector Search) wasn't enough because laws reference other laws. We implemented GraphRAG using AWS Neptune to map relationships between articles. When a query comes in, our Router Agent assigns it to a specialist (e.g., Labor Law Agent), which traverses the graph to find the exact legal pathways before drafting a response.

My Role

As an AI Engineer Intern, I owned the multi-agent pipeline. I designed the graph schema, wrote the Cypher queries to extract context, and built the Reviewer Agent that strictly verifies every citation in the generated response against the original legal text to prevent hallucinations.

Ask about the project

Ask a question about the tech stack or my role in the project.