Semantic Code Repository Search Using Latent Vector Embeddings

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing code search techniques in large programming repositories rely primarily on keyword matching, failing to capture functional similarities between code artifacts, leading to ineffective search results and reduced developer productivity.

Innovation Solution

Utilizing natural language processing and vector embeddings to convert programming code segments into multi-dimensional vector representations, enabling semantic search based on functional similarity by generating multiple summaries with different prompts and matching search queries in a shared latent space.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If keyword matching is used for code search, then the search process is simple and fast, but the search accuracy and ability to capture functional similarities deteriorates

Engineering Contradiction:
Improvesearch accuracyVSAvoidsearch system complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent introduces natural language descriptions as an intermediary between code artifacts and search queries. These descriptions serve as a bridge that captures the functional meaning of code, enabling semantic search without requiring complex analysis of the code itself during search operations

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent replaces traditional keyword-matching mechanisms with semantic similarity comparison based on natural language processing. Instead of mechanical string matching, the system uses vector representations and similarity metrics to capture functional relationships between code and queries

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Measurement precision

If multiple natural language descriptions are generated for each code segment, then the search coverage and accuracy improve, but the processing time and computational resources increase

Engineering Contradiction:
Improvesearch accuracyVSAvoidprocessing time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent generates multiple natural language descriptions for each code artifact in advance, before actual search operations. These pre-generated descriptions are stored and can be quickly retrieved during search, avoiding the need to generate them on-demand

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system varies parameters such as description length, detail level, and focus areas when generating multiple natural language descriptions. This creates diverse representations that capture different aspects of code functionality, improving search coverage without uniformly increasing processing complexity

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS20250245253A1Searching programming code repositories using latent semantic analysis
Publication Date: 2025.07.31 INTUIT INC
  • US20250245253A1 patent drawing
  • US20250245253A1 patent drawing
  • US20250245253A1 patent drawing

AI summary

Certain aspects of the disclosure are directed to searching programming code repositories. In examples, a method is provided that includes receiving a natural language search query via a graphical user interface; converting the natural language search query into a vector representation; determining a proximity score between the vector representation of the natural language search query and at least one vector representation corresponding to a machine learning model generated natural language description of a programming code segment; and providing a search result corresponding to the programming code segment based on the proximity score.