Pipelined SPL Code Generation with Retrieval-Augmented Verification

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Individuals in the technology industry, including engineers and software developers, often lack familiarity with programming languages they are required to use, and existing large language models (LLMs) struggle to generate accurate and contextually relevant software code, particularly in complex languages like Search Processing Language (SPL), leading to inefficiencies and errors.

Innovation Solution

A pipelined search query generation engine utilizing a retrieval augmented generation (RAG) pipeline to process natural language queries, incorporating a vector database and LLMs to generate, explain, or answer SPL statements, and integrate schema verification to reduce hallucinations, ensuring accurate and contextually relevant code generation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If existing large language models are used to generate software code, then code generation capability is provided, but accuracy and contextual relevance deteriorate, particularly in complex languages like SPL

Engineering Contradiction:
Improvecode generation capabilityVSAvoidcode accuracy and contextual relevance
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent introduces a retrieval augmented generation system that acts as an intermediary between the LLM and the code generation task. A retrieval module fetches relevant code snippets, documentation, and examples from a knowledge base before the LLM generates the code. This intermediary retrieval mechanism ensures the LLM has accurate, contextually relevant information about SPL syntax and semantics, thereby improving code accuracy without sacrificing generation capability

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system performs preliminary retrieval of relevant information from the knowledge base before the actual code generation occurs. By pre-fetching accurate SPL syntax rules, semantic definitions, and contextual examples, the system ensures the LLM works with verified information rather than generating from potentially inaccurate training data alone, thus improving reliability before generation happens

Inventive Principle:
Principle #10Preliminary action

2Productivity

If LLMs are used to generate code in complex programming languages, then development efficiency is improved, but errors and hallucinations increase

Engineering Contradiction:
Improvedevelopment efficiencyVSAvoidcode errors and hallucinations
Core Design Contradiction:
ProductivityVSObject-generated harmful factors

Solution Approach 1:

The patent implements a feedback mechanism where the retrieved information from the knowledge base is used to verify and correct the LLM's generation. The system can compare generated code against retrieved accurate SPL syntax rules and semantic definitions, identifying and correcting hallucinations or errors in real-time, thus maintaining development efficiency while reducing harmful outputs

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The retrieval module serves as a mediator that provides verified reference information to the LLM, preventing the LLM from generating hallucinated or incorrect code. By having the LLM reference accurate SPL documentation and examples retrieved from the knowledge base, the system reduces errors while maintaining the speed benefits of AI-generated code

Inventive Principle:
Principle #24Intermediary (Mediator)

3Extent of automation

If individuals use LLMs to generate code snippets and automate tasks, then repetitive coding work is reduced, but understanding of programming language syntax and semantics deteriorates

Engineering Contradiction:
Improverepetitive coding task automationVSAvoidprogramming language syntax and semantics understanding
Core Design Contradiction:
Extent of automationVSLoss of information

Solution Approach 1:

The retrieval module acts as an educational intermediary by providing the LLM with accurate SPL syntax rules, semantic definitions, and coding examples. This ensures that even when the LLM automates code generation, it references verified language knowledge, thereby maintaining understanding of syntax and semantics while enabling automation

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system performs preliminary retrieval of accurate programming language information before generation occurs. This pre-fetching of verified syntax and semantic knowledge ensures that the automated code generation process is grounded in correct language understanding, preventing the loss of technical knowledge while maintaining high automation capability

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS20250245446A1Systems and Methods for Automated Generation of Programming Code Through Integration with Generative Artificial Intelligence
Publication Date: 2025.07.31 CISCO TECHNOLOGY INC
  • US20250245446A1 patent drawing
  • US20250245446A1 patent drawing
  • US20250245446A1 patent drawing

AI summary

Disclosed herein are systems and methods for improving the auto-generation of pipelined search query statements by a large language model (LLM). In some examples, such a method includes operations of receiving a user-provided prompt, wherein the user-provided prompt is provided in natural language, identifying an objective of the user-provided prompt, and based on the objective, providing the user-provided prompt to a first operational pipeline of a plurality of operational pipelines, wherein each operational pipeline is associated with a unique prompt template. Additionally, the method may include generating, by the first pipeline, an auto-generated prompt based on a first unique prompt template of the first pipeline, providing the auto-generated prompt to a large language model (LLM), and receiving a response to the auto-generated prompt from the LLM. A graphical user interface (GUI) may then be generated that displays the response to the auto-generated prompt.