Back to Archive

VibeFit: Agentic AI Wardrobe Engine

Software Engineer • AI Systems

Overview

VibeFit is an AI-powered virtual wardrobe that eliminates manual clothing organization by automatically extracting structured garment information from images and enabling semantic outfit discovery through natural language. Instead of relying on manually assigned categories or filters, the platform combines multimodal language models, vector search, and agent orchestration to create a searchable digital wardrobe that understands clothing by meaning rather than keywords. The platform is built around two independent LangGraph workflows. The Ingestion Workflow converts uploaded clothing images into structured wardrobe assets, while the Retrieval Workflow generates grounded outfit recommendations exclusively from garments the user owns. This separation keeps ingestion and retrieval independent, easier to maintain, and individually extensible.

System Architecture

The platform is composed of two independent LangGraph workflows connected through a shared PostgreSQL + pgvector knowledge store.

High-Level Architecture

Overall System Architecture

Ingestion Workflow

LangGraph Ingestion Workflow

Retrieval Workflow

LangGraph Retrieval Workflow

Agentic Workflow

Rather than implementing a linear request pipeline, the application separates ingestion and retrieval into two independent stateful LangGraph workflows. Each workflow owns a single responsibility and is composed of specialized nodes that communicate through shared state.

  • The Ingestion Workflow validates uploaded images, extracts structured garment metadata using Gemini Vision, validates the generated metadata, retries extraction when validation fails, generates semantic embeddings, and persists both structured metadata and vector representations into PostgreSQL with pgvector indexing.
  • The Retrieval Workflow converts a user's styling request into an embedding, performs vector similarity search against only that user's wardrobe, retrieves the most relevant garments, and provides this context to Gemini to generate retrieval-grounded outfit recommendations.
  • Separating ingestion from retrieval keeps both workflows independently maintainable while allowing future extensions such as background processing, document ingestion, model replacement, or additional recommendation strategies without affecting the overall system.
  • LangGraph provides explicit workflow state, conditional routing, retry loops, and node-level orchestration, making the execution model significantly easier to reason about than deeply nested asynchronous application code.

Engineering Decisions

Many implementation choices were driven by long-term maintainability, reliability, and simplicity rather than selecting the most complex AI stack available.

  • Separated ingestion from retrieval into independent workflows so new garments can be processed asynchronously without affecting recommendation latency.
  • Stored structured garment metadata and vector embeddings together in PostgreSQL using pgvector, simplifying infrastructure while enabling efficient semantic retrieval alongside relational queries.
  • Used schema-constrained structured outputs for metadata extraction to ensure downstream nodes always receive predictable data, reducing manual parsing and validation logic.
  • Restricted the recommendation model to retrieved wardrobe items instead of allowing unrestricted generation, ensuring every recommendation corresponds to clothing actually owned by the user.

Reliability & Guardrails

  • Validated uploaded images before metadata extraction to reject non-clothing inputs and avoid unnecessary multimodal inference.
  • Verified extracted metadata against predefined validation rules before persisting records into the wardrobe database.
  • Implemented retry loops that automatically re-executed metadata extraction whenever validation failed.
  • Constrained outfit generation to retrieved wardrobe items, preventing fabricated garments from appearing in recommendations.
  • Used LangSmith traces to inspect node execution, workflow state transitions, and failures during development.

Performance & Scalability

  • Compressed uploaded images before multimodal inference to reduce latency and token usage while preserving sufficient visual quality for garment analysis.
  • Generated embeddings only once during ingestion, allowing future searches to reuse stored vectors instead of repeatedly processing wardrobe items.
  • Limited semantic search to the authenticated user's wardrobe, reducing vector search scope and improving retrieval performance.
  • Separated indexing and retrieval workflows, allowing ingestion to evolve into asynchronous background processing without affecting recommendation requests.

Screenshots

Lessons Learned

Building VibeFit reinforced that reliable AI systems require significantly more engineering around the language model than the model itself. Workflow orchestration, validation, observability, retrieval constraints, and clear system boundaries consistently contributed more to system quality than prompt engineering alone. The project also highlighted the importance of treating LLMs as components within a larger software system rather than the system itself. Separating responsibilities across specialized workflow nodes made the application easier to reason about, debug, extend, and evaluate as new capabilities were introduced.

Future Improvements

  • Hybrid retrieval combining vector similarity with structured metadata filtering.
  • Model fallback strategies to improve resilience during provider failures.
  • Image similarity search for visually related garments in addition to semantic retrieval.
  • User feedback loops to continuously improve recommendation quality.
  • Evaluation datasets and automated regression testing for workflow changes.