feat: Cosmos DB NoSQL create-index samples and quickstart articles (Python, Go, .NET, Java, TypeScript)#92
Open
diberry wants to merge 6 commits into
Conversation
bef5a66 to
7a5dd52
Compare
…ython, Go, .NET, Java, TypeScript) - Python: transactional batch inserts, azure-cosmos SDK, DefaultAzureCredential - Go: concurrent goroutine inserts with semaphore, azcosmos SDK - .NET: bulk executor pattern, Microsoft.Azure.Cosmos SDK - Java: bulk operations, azure-cosmos SDK - TypeScript: batch upsert, @azure/cosmos SDK - Shared infra: vector-containers.bicep, updated database.bicep - Quickstart articles for all 5 languages (8/8 agent approval) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
7a5dd52 to
2cf3d52
Compare
- Document all 3 distance metrics (Cosine, Euclidean, DotProduct) - Clarify that these are Cosmos DB NoSQL parameter names (not DocumentDB's) - Add section on comparing all metrics with COMPARE_DISTANCE_METRICS=true - Update expected output examples showing single metric and comparison modes - Add RU cost tracking in comparison output
…ript, Java, .NET) - Go: Added ValidDistanceFunctions, ExecuteMetricComparison, PrintMetricComparison - TypeScript: Added VALID_DISTANCE_FUNCTIONS, runSingleMetricQuery, runMetricComparison - Java: Added VALID_DISTANCE_FUNCTIONS, runSingleMetricQuery, runMetricComparison - .NET: Added ValidDistanceFunctions, RunSingleMetricQuery, RunMetricComparison - All languages now support VECTOR_DISTANCE_FUNCTION and COMPARE_DISTANCE_METRICS environment variables - All samples now show RU costs per metric when in comparison mode Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…languages - Python: Corrected 4-parameter VectorDistance query syntax with JSON options - Go: Fixed distance function parameter handling and added metrics comparison - TypeScript: Updated VectorDistance calls to use correct 4-parameter format with options object - .NET: Fixed RequestCharge type issue and added command-line argument support for non-interactive execution - Java: Fixed Maven Java 21 compatibility issue (now targets Java 17) All samples now produce identical output with distance metrics (Cosine, Euclidean, DotProduct) correctly implemented. Verified consistency across all languages: - Hotel rankings: Royal Cottage Resort, Country Comfort Inn, Nordick's Valley Motel, Economy Universe Motel, Roach Motel - Metric scores identical within floating-point precision - Request charges: ~8-9 RUs per metric across all implementations Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…Go, TypeScript, .NET, Java) - Implement 2-algorithm × 3-metric comparison table output (DiskANN & QuantizedFlat with cosine, euclidean, dotproduct) - Show Top 1 & Top 2 results with scores in unified ASCII table format - Control comparison mode via COMPARE_DISTANCE_METRICS=true environment variable - Python: Added metric comparison loop and table formatting - Go: Port metric comparison from Python with case-insensitive handling - TypeScript: Implement metrics table with proper result ordering - .NET: Move COMPARE_DISTANCE_METRICS check early to bypass interactive menu - Java: Fix field name validation by stripping quotes from .env values; configure maven-shade-plugin for runnable JAR with proper manifest All 5 samples now produce comparable output when COMPARE_DISTANCE_METRICS=true is set. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ms × 3 distance functions) - Python: Updated table to show COS, L2, IP metrics for both DiskANN and QuantizedFlat - Go: Updated table to show COS, L2, IP metrics for both DiskANN and QuantizedFlat - TypeScript: Created sample-output.txt with complete 6-row metrics table - .NET: Updated table to show COS, L2, IP metrics for both DiskANN and QuantizedFlat - Java: Updated table to show COS, L2, IP metrics for both DiskANN and QuantizedFlat Each output now displays Top 1 & Top 2 results with scores for all metric combinations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Combined PR: All 5 language implementations + quickstart articles
This PR combines PRs #88, #89, #90, #91 into a single deliverable.
What's included
Shared infrastructure
Review status
PRs #88, #90, #91 achieved 8/8 unanimous approval via 8-agent specialist review (Variant B).
Supersedes: #88, #89, #90, #91