This project enhances the Nike 10-K semantic search pipeline by introducing structured metadata filters and query rewriting capabilities. It moves beyond simple similarity search by allowing users to ask targeted questions tied to specific sections of the document (e.g., “beginning”, “middle”, “end”).

Built with LangChain, GPT-4o-mini, and Chroma, this implementation applies Pydantic schemas to capture structured queries and leverages LangChain’s structured output features for cleaner, more precise retrieval.

Features

Key Insight

Structured retrieval is the missing link between raw vector search and truly useful AI. By adding metadata and rewriting queries to align with document structure, you increase both precision and interpretability, two key traits of trustworthy AI systems.

View the source code on GitHub

View on GitHub →