explaingit

seanlee10/ai-engineer-singapore-2026-real-agent-workshop

Analysis updated 2026-05-18

14TypeScriptAudience · developerComplexity · 4/5Setup · hard

TLDR

A workshop project showing a legal question answering AI that tests itself and automatically improves its own retrieval accuracy.

Mindmap

mindmap
  root((Legal RAG Workshop))
    What it does
      Answers legal questions
      Self improves retrieval
    Architecture
      LangGraph agent
      OpenSearch indexing
      Ralph improvement loop
    Tech stack
      Python
      Docker
      Arize evaluation
    Audience
      Workshop attendees
      AI engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a retrieval-augmented question answering agent over a legal document corpus.

USE CASE 2

Set up an automated loop that improves retrieval quality until it hits a recall target.

USE CASE 3

Learn how to combine LangGraph, OpenSearch, and an evaluation platform like Arize.

USE CASE 4

Use as a workshop template for building a self-improving RAG system in another domain.

What is it built with?

PythonLangGraphOpenSearchDockerArizeOpenAI

How does it compare?

seanlee10/ai-engineer-singapore-2026-real-agent-workshop0xbebis/hyperpayalfredxw/nova
Stars141414
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyhardhardmoderate
Complexity4/55/53/5
Audiencedeveloperdeveloperwriter

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires Docker, an Arize account, and OpenAI or Anthropic API keys before the self-improvement loop can run.

No license information is provided in the README.

In plain English

This is a workshop repository demonstrating a self-improving AI question answering system built for legal research. The specific use case is answering questions from a Victorian bench book, a reference guide used in legal proceedings. The system combines two ideas: retrieval augmented generation, where the AI fetches relevant document passages before generating an answer, and an autonomous improvement loop that automatically tunes the system until it reaches accuracy targets. The architecture has three parts. First, a LangGraph based agent accepts a question, searches an OpenSearch database for the most relevant legal passages using a semantic search technique called kNN, then passes those passages to a language model to generate a plain language answer. Second, an indexing pipeline processes the legal corpus, splits it into chunks, converts each chunk into a numerical embedding, and stores the results in OpenSearch. Third, an autonomous improvement agent called Ralph runs a loop: it picks a failing quality target from a requirements document, modifies the retrieval or indexing code, runs tests and linting, then measures recall metrics using the Arize evaluation platform. If the recall target of reaching 80 percent for the top 5 results is not met, Ralph generates new improvement tasks and tries again until targets are met or a maximum iteration count is reached. The system is built in Python, uses the uv package manager, runs OpenSearch locally via Docker, and requires API keys for OpenAI, for embeddings and answering, and Arize, for evaluation. The repository was created for the AI Engineer Singapore 2026 workshop.

Copy-paste prompts

Prompt 1
Walk me through setting up this workshop's agent, index pipeline, and Docker based OpenSearch locally.
Prompt 2
Explain how Ralph's self-improvement loop decides when to stop iterating on the retrieval code.
Prompt 3
Show me how the LangGraph agent's retrieve and call_model nodes fit together.
Prompt 4
Help me adapt this legal RAG pipeline to a different document corpus of my own.

Frequently asked questions

What is ai-engineer-singapore-2026-real-agent-workshop?

A workshop project showing a legal question answering AI that tests itself and automatically improves its own retrieval accuracy.

What language is ai-engineer-singapore-2026-real-agent-workshop written in?

Mainly TypeScript. The stack also includes Python, LangGraph, OpenSearch.

What license does ai-engineer-singapore-2026-real-agent-workshop use?

No license information is provided in the README.

How hard is ai-engineer-singapore-2026-real-agent-workshop to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is ai-engineer-singapore-2026-real-agent-workshop for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.