Project Blog: Florence

A project blog by

Yohann Ian

AI/ML Engineer

I initially ran Florence on AWS. If you want to try it out, visit the link below. But bear in mind, I turned it off on AWS because it takes money to keep it running and to make API calls. Instead, I deployed the UI on Netlify for free… call it a mannequin. It ain’t the real thing, but I thought it would be nice to put it out there.

Netlify LINK: https://florence-ui-preview.netlify.app/
GitHub LINK: https://github.com/Yohann-Ian/florence-literature-rag

Florence: Retrieval Augmented Generation Agent

I built a RAG agent for literary analysis and deployed it on AWS. Yes, I like literature.

  • RAG Pipelines
  • LangGraph
  • FastAPI
  • Docker
  • AWS ECS
  • ChromaDB
  • Orchestration
  • Ragas Evaluation
  • HITL Systems

How do I combine my love for creating things with my love for literature?

I develop a RAG.

Delightful for writers.

Demonstrative for AI Engineers.

I built this Literary Analysis RAG agent from scratch and ran it on AWS. It’s a highly technical end-to-end project, showcasing the highly-sought skills and tools for deploying AI-enhanced systems in the workplace.

Let me take you through.

Project Florence

An AI Agent that Runs Comparative Analysis on Literature Books

“Whatever talents a person may possess to amuse and instruct others, be they ever so inconsiderable, he is yet bound to exert them: if his attempt be ineffectual, let the punishment of an unaccomplished purpose have been sufficient; let none trouble themselves to heap the dust of oblivion upon his efforts.”

Percy Bysshe Shelley, Prometheus Unbound

This project touches many technical concepts and offers a first-hand experience of building an AI Agent using Langgraph.

Demo Videos. But seriously, read the rest of the page.

A full Florence run on localhost. I did not cut short or speed up the video. You’'ll see it exactly as it is.

Running it on Amazon AWS

I successfully served Florence on Amazon ECS, with CloudWatch Logs in the background.

Offline ingestion  ·  runs once, ships with the image Books EPUB · PDF · TXT Chunking HIERARCHICAL/SEMANTIC/FIXED Embed BGE-LARGE · LOCAL GPU ChromaDB VECTOR INDEX · SHIPPED IN IMAGE Serving layer  ·  AWS  ·  public URL You ASK A QUESTION AWS ALB HTTPS · 300S IDLE AWS ECS · Docker FARGATE · 1 vCPU · 2 GB FastAPI UVICORN · PYDANTIC graph.invoke() LANGGRAPH ENTRY Enters agent Florence RAG  ·  agent state machine (LangGraph) Domain router HAIKU CLASSIFIER · YES/NO Valid Invalid END Retrieve TOP-K = 5 · CHROMA QUERY READS Grade documents 5× HAIKU · PARALLEL · YES/NO Enough Rewrite query SONNET · REPHRASE Insufficient Retry Generate SONNET · MAX 4096 · TEMP 0.3 Check hallucination LLM-AS-JUDGE · JSON SCORES Grounded Ungrounded HITL checkpoint interrupt() · CONFIDENCE ≥ 0.7 Pause You (review) APPROVE OR REJECT Reject + feedback (≤ 3) Approve You (read answer) GROUNDED · SOURCES · SCORES
Process Data store You / endpoint

Indexed:

1984, George Orwell

Brave New World, Aldous Huxley

Initially, I indexed these others in the Corpus. But the project became too big to handle. It was as they say… hubris. Great reads by the way. These are:

The Aeneid, Virgil

Paradise Lost, John Milton

Crime and Punishment, Fyodor Dostoevsky

Anna Karenina, Leo Tolstoy

The Master and Margarita, Mikhail Bulgakov

A Farewell to Arms, Ernest Hemingway

East of Eden, John Steinbeck

Beloved, Toni Morrison

The Machine

A quick look at the inner machinery. I’ll go into detail further below. It’s quite intricate. If you come from electrical engineering, you’d recognise this as a state machine. (My impression going into AI agents and Langgraph)

The RAG Agent

Just to be clear with you, I’m not building a town.


The RAG agent’s name, Florence, was inspired by the Renaissance period, that originated in Florence, Italy.

Before I get technical, I want you to know what it does and see how it looks like from a UI.

Answers are drawn from the Corpus, the collection of books that were vectorized, usable by the agent.

The Corpus