RAG brand content studio

Folio

On-brand LinkedIn posts, image cards, and documents, written from each brand's own material.

  • Live demo view
  • Video watch
  • Code GitHub
Folio generate screen for a demo brand: a brief, a generated image card, the post caption, and the retrieved brand context.

01Overview

Folio writes LinkedIn posts, designed image cards, and branded documents that sound like a specific company. It indexes each brand's voice guides, past posts, and personas, then retrieves the right pieces at generation time so Claude writes on-brand instead of generic copy. Each brand lives in its own workspace, and every generation records which passages it used.

02Key features

  • One workspace per brand, with its own documents, palette, fonts, and voice
  • LinkedIn posts and 1080x1350 image cards, with the preview identical to the exported PNG
  • Branded documents exported to Word, PDF, and PowerPoint
  • "Learn from an image": upload a logo or brand guide and Claude proposes colors, fonts, and voice for review
  • Every generation shows which brand passages it used and their scores

03How the AI works

Retrieval decides what Claude sees; two passes decide how it writes.

  • Voice and content-pillar passages are always included, plus the top 6 semantic matches, fetched together and deduplicated.
  • The copy streams over SSE into the live preview.
  • A strict forced tool call then returns the structured fields: headline, body, CTA, hashtag.
  • Retrieved brand material is escaped inside a fenced block to resist prompt injection.

04Tech stack

AI
Claude Sonnet 5.5, Anthropic SDK, OpenAI text-embedding-3-small, LangChain text splitters
Frontend
React 19, TypeScript, Vite, Tailwind CSS v4, shadcn/ui, Satori and resvg (PNG rendering)
Backend
Python, FastAPI, Pydantic v2, server-sent events, ReportLab
Data
MongoDB (Motor), Chroma vector store (one collection per workspace)
Infra
Docker, GitHub Actions, AWS

05Architecture

Index brand material

  1. Upload
  2. Parse
  3. Chunk800 characters, 120 overlap
  4. Embed
  5. StoreOne vector collection per workspace

Generate

  1. Request
  2. RetrievePinned plus top 6
  3. PromptBrand context fenced
  4. Claude streams copy
  5. Forced tool callStructured fields
  6. Render and saveWith a retrieval snapshot

06Results and evals

MeasureResult
Retrieval hit rate at 6 (8 briefs)Threshold 0.75, scored on a lexical test store
Automated testsAbout 456 (296 server, 160 client)
July security audit1 critical, 7 high, all fixed
October QA pass17 issues, all fixed

Every generation also saves a snapshot of the passages it used and their scores.

07Decisions and lessons

  • No framework. The pipeline is four steps, so it's written directly on the SDKs instead of LangChain.
  • Vector store. Chroma and Qdrant over Pinecone, on cost.
  • Hosting. ECS over Lambda, because cold starts hurt streaming.
  • Pinned pillars. Content pillars were being crowded out of retrieval, so they are now always included.

08Screenshots

James Littlefield, 2026.