PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/ML System Design/Credit Genie

Integrate Chroma and design semantic search API

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's competency in ML system design and backend engineering, covering integration of a vector store, embedding model selection and schema design, API endpoint design for upsert/delete/query, metadata handling, and consistency between a CRUD datastore and a semantic search index.

  • hard
  • Credit Genie
  • ML System Design
  • Software Engineer

Integrate Chroma and design semantic search API

Company: Credit Genie

Role: Software Engineer

Category: ML System Design

Difficulty: hard

Interview Round: Technical Screen

Extend the CRUD service by integrating a Chroma vector store to support semantic search over documents. Tasks: a) define the collection schema and how embeddings are produced; b) implement endpoints to upsert, delete, and query by vector similarity; c) implement a search_query function that returns a specified response object with a 'results' list that may be empty when there are no matches (never return None), and include fields like scores and metadata; d) describe how you would handle indexing, pagination, filtering by metadata, and eventual consistency; e) discuss latency targets, batching, and error handling in production.

Quick Answer: This question evaluates a candidate's competency in ML system design and backend engineering, covering integration of a vector store, embedding model selection and schema design, API endpoint design for upsert/delete/query, metadata handling, and consistency between a CRUD datastore and a semantic search index.

Credit Genie logo
Credit Genie
Sep 6, 2025, 12:00 AM
Software Engineer
Technical Screen
ML System Design
3
0

System Design: Add Semantic Search to an Existing CRUD Service Using Chroma

Context

You own a document CRUD service (create/read/update/delete) that stores documents with an id, text body, and optional metadata. Extend this service by integrating a Chroma vector store to support semantic search over documents. Assume you can add a background worker if needed, but aim for a minimal, production-ready design.

Tasks

  1. Define the vector collection schema and explain how text embeddings are produced (model choice, dimensionality, normalization, and how metadata is stored).
  2. Implement API endpoints to:
    • Upsert documents into the vector store.
    • Delete documents (by id and/or by metadata filter).
    • Query by vector similarity (semantic search) with optional metadata filters.
  3. Implement a search_query function that returns a response object with a required results list (may be empty; never None ). Include per-result scores and metadata.
  4. Describe how you would handle:
    • Indexing strategy and parameters.
    • Pagination for vector search results.
    • Filtering by metadata.
    • Eventual consistency between the CRUD store and the vector index.
  5. Discuss production concerns: latency targets, batching strategies, and error handling (including retries, timeouts, and idempotency).

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More ML System Design•More Credit Genie•More Software Engineer•Credit Genie Software Engineer•Credit Genie ML System Design•Software Engineer ML System Design
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.