# Refactoring non-compliant code into compliant code

*Источник: Google Patents*
*Дата: 2026-09-02*
*Язык: en*

Refactoring non-compliant code into compliant code

Techniques for intelligently prompting an LLM to refactor code are disclosed. A code snippet is accessed. This code is identified as potentially comprising a reference to an out-of-compliance library. Context for the code snippet is generated. An LLM prompt is then built. This prompt will be fed to the LLM, and the prompt instructs the LLM to refactor the code snippet into modified code, which calls a compliant library. Output of the LLM is displayed. This output is based on the LLM operating in response to the LLM prompt. The output includes a proposed rewritten version of the code snippet.

[Оригинал](https://patents.google.com/patent/EP4799036A1/en)