Skip to Main Content
InterSystems Ideas
We love hearing from our users. Tell us what you want to see next and upvote ideas from the community.
* Bugs and troubleshooting should as usual go through InterSystems support.
Status Community Opportunity
Categories Generative AI
Created by Alex Woodhead
Created on Jan 16, 2024
Merged idea

This idea has been merged into another idea. To comment or vote on this idea, please visit DPI-I-495 Train a Large Language Model for a Development AI like GitHub Copilot on ISC.

AI extensibility Prompt keyword for Class and Method implementation. Also Prompt macro generator. Merged

To accelerate capability of growing code generation. This proposal suggests new extensibility facilities and hooks that can be democratized to community and / or fulfilled by commercial partners.

To add Training metadata to Refine a Large Language Model for code, a

"Prompt Input" is associated with an expected "Code Output", as part of a class definition.

This provide structured keywords to describe:

  • The expected output

  • And / Or Chain-of-thought to generate the correct output

/// The following Prompt describes the full implementation of the class

Class alwo.Calculator [Abstract, Prompt = "Provides methods to Add, Subtract, Multiply and divide given numbers." ]

{

/// The following Prompt describes the full implementation of the method

ClassMethod Add(arg1 As %Float, arg2 As %Float) As %Float [ Prompt ="Add numeric arguments and return result." ]

{

return arg1 + arg2

}

ClassMethod Subtract(arg1 as %Float, arg2 As %Float)

{

&Prompt("Subtract numeric arguments and return result")

)

}



The Prompt macro generates code based on the context of the method it is within.

Once resolved, it automatically comments out the processed macro.

ClassMethod Subtract(arg1 as %Float, arg2 As %Float)

{

//&Prompt("Subtract arguments and return the result")

return arg1 - arg2

//&Prompt("Model alwogen-objectscript-7.1.3")

)


The generator leveraged at compilation time could be configured in a similar way to how source control is configured for a namespace.

Configuration could lock / exclude packages from being processed in this way.

A "\prompt" compilation flag could be used to control the default environment behavior and editor compilation behavior. For example to force reprocessing of previously resolved prompts due to a newer more capable version of code Large Language Model, then a "\prompt=2" could be applied.

Different models or third-party services could be applied depending the language of the given method.

When redacting source code by "deployment", the existing "deploy" facility could be extended to also ensure removal of "Prompt" metadata from code.



  • ADMIN RESPONSE
    Jan 22, 2024

    Thank you for submitting the idea. The status has been changed to "Community Opportunity".

    Stay tuned!