Hybrid Code Retrieval With LLM Mediation for Reliable Generation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing code generation systems, particularly those using Large Language Models (LLMs), lack a deep understanding of programming nuances and domain-specific requirements, leading to suboptimal solutions and potential vulnerabilities when integrating reused code.

Innovation Solution

A hybrid coding system combining a code snippet database, chatbot interface, and LLM to facilitate efficient and secure code generation by indexing and vectorizing code snippets, allowing developers to interact conversationally to retrieve tailored solutions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If LLMs are used to generate code, then code generation speed is improved, but code quality and reliability deteriorate

Engineering Contradiction:
Improvecode generation speedVSAvoidcode quality
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent introduces a code snippet database as an intermediary between the LLM and the final code generation. The LLM generates candidate code snippets, which are then retrieved and refined from the database, ensuring both speed (from LLM) and quality (from database curation)

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system merges two approaches: LLM-based generation (for speed) and database-based retrieval (for quality). By combining these two systems, the patent achieves both rapid code generation and reliable, high-quality output

Inventive Principle:
Principle #5Merging (Combining)

2Productivity

If existing code is reused to expedite development, then productivity is improved, but understanding and integration complexity increase

Engineering Contradiction:
Improvedevelopment speedVSAvoidintegration complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The chatbot interface acts as an intermediary that simplifies code reuse. Developers interact through natural language rather than directly managing complex code dependencies, reducing the perceived complexity while maintaining productivity benefits

Inventive Principle:
Principle #24Intermediary (Mediator)

3Adaptability or versatility

If LLMs generate code without domain understanding, then generation flexibility is improved, but code security and best practices adherence deteriorate

Engineering Contradiction:
Improvegeneration flexibilityVSAvoidsecurity
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The system performs preliminary actions by pre-curating and storing validated code snippets in the database before they are needed. This ensures that only secure, best-practice-compliant code is available for retrieval, even as the LLM maintains its flexible generation capabilities

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS20260003582A1Hybrid Coding System
Publication Date: 2026.01.01 OPEN TEXT CORP
  • US20260003582A1 patent drawing
  • US20260003582A1 patent drawing
  • US20260003582A1 patent drawing

AI summary

Systems and methods for hybrid coding are provided. Various embodiments of the present technology provide systems and methods that are designed to simplify software development by combining a code snippet database, a chatbot interface, and a large language model (LLM). In some embodiments, a chatbot interface is provided where users describe their requirements, preferences, and project details via a conversation with the chatbot. Using the LLM, the system searches the code snippet database to select relevant code snippets tailored to the user's needs. The selected code snippet is returned to the user, along with any desired supporting documentation or information.