Skip to content

Instantly share code, notes, and snippets.

View priyankc's full-sized avatar
💭
...on a debugging spree!

Priyank Chodisetti priyankc

💭
...on a debugging spree!
View GitHub Profile
@priyankc
priyankc / fix.md
Created May 18, 2025 12:20
Bug fix report: Metadata Key and Operator Name Ambiguity in Chroma

Fix for Metadata and 'Where' Filter Edge Cases

Problem Summary

Chroma's metadata filtering had issues with edge cases in the 'where' clause functionality, specifically:

  1. Metadata keys that match operator names (like $in or $nin) caused conflicts and ambiguity
  2. The system couldn't reliably distinguish if $in in a query should be treated as an operator or a metadata field name
  3. The query processing was inconsistent in handling these special keys
@priyankc
priyankc / repro.md
Created May 18, 2025 12:09
Reproduce bugs related to Metadata/where edge cases

Issue: chroma-core/chroma#4388

Bug Reproduction: Metadata Key and Operator Name Ambiguity in Chroma

I've successfully reproduced a bug in ChromaDB where metadata keys that match operator names (like $in or $nin) cause unexpected behavior in complex query filtering.

Bug Description

When a metadata key matches an operator name (like $in) and that key is used in a complex query that also uses the same name as an operator in a different part of the query, the filter fails to work correctly, returning no results when it should return matching documents.

Steps to Reproduce

@priyankc
priyankc / repro_1770.md
Last active May 18, 2025 05:35
Bug Repro: AzureOpenAI Embedding Function Parameter Mismatch

Bug Reproduction: (AzureOpenAI Embedding Function Parameter Mismatch)[chroma-core/chroma#1770]

Description of the Bug

I successfully reproduced the bug where the AzureOpenAI embedding function in ChromaDB fails due to a parameter naming issue. The issue is that the OpenAIEmbeddingFunction class uses azure_deployment as a parameter name when initializing the AzureOpenAI client, but there appears to be a mismatch between what's expected by the OpenAI SDK.

Commands to Reproduce

  • First, I examined the original code to find the issue:
    cat ./chromadb/utils/embedding_functions/openai_embedding_function.py
@priyankc
priyankc / application.html.haml
Created March 13, 2013 07:31
Don't show anyhtml if there are no picks
- if @picks.any?
%body{id: "wide-widget", class: "#{@widget_preference.arrow.present? ? "has-arrow" : "no-arrow"}"}
- else
%body{id: "wide-widget", style: 'display: none', class: "#{@widget_preference.arrow.present? ? "has-arrow" : "no-arrow"}"}