Skip to content
Piyush
Case study 01AI · SaaS

Cortex

AI research assistant

Chat with your documents. Cortex turns PDFs, notes and wikis into a searchable knowledge base with cited, streaming answers.

Role
Design & full-stack engineering
Timeline
10 weeks
Team
Solo project
Year
2026

(01) Overview

Teams lose hours hunting for answers buried in long documents. Cortex lets anyone upload their files and ask questions in plain language — every answer streams in seconds and links back to the exact passage it came from.

(02) The challenge

Language models sound confident even when they are wrong. The real challenge was trust: retrieving the right context from thousands of chunks, and showing people exactly where every claim came from.

(03) Approach

  1. Step 01

    Retrieval that holds up

    A hybrid search pipeline combines pgvector embeddings with Postgres full-text search, then re-ranks results before they ever reach the model.

  2. Step 02

    Citations by design

    Every chunk carries its source and page number. The model cites inline, and the interface turns each citation into a hoverable preview.

  3. Step 03

    Streaming everywhere

    Answers stream token by token with optimistic UI, so the interface never feels blocked — even on slower connections.

(04) Highlights

  • Drag-and-drop ingestion for PDF, Markdown and Notion exports
  • Hybrid search with re-ranking for more accurate answers
  • Inline citations with source previews
  • An evaluation suite that catches regressions before every deploy

(05) Results

Less time spent searching docs
62%
Questions answered in month one
1.2k
Median time to first token
<2s

(06) What I learned

“Shipping AI features is 20% prompting and 80% data plumbing and evaluation. Writing evals early changed how confidently I could iterate.”

(07) Built with

  • Next.js
  • TypeScript
  • OpenAI API
  • pgvector
  • Drizzle
  • Tailwind CSS

Next project

Ledgerly

Personal finance dashboard