AstuteSource / chasten

:dizzy: Chasten Uses XML and XPATH to Check a Python Program's AST for Specified Patterns!
https://pypi.org/project/chasten/
GNU General Public License v2.0
7 stars 8 forks source link

Add Integration with a Large Language Model (LLM) for Help with Creating XPath Expressions from XML Snippets #33

Closed gkapfham closed 9 months ago

gkapfham commented 1 year ago

One of the most challenging tasks associated with using Chasten is that a person must write their own XPath expressions in order to query the AST of a Python program. It would be ideal if Chasten could provide some support for automatically creating the XPath expressions for a specific query.

One option that we should consider is giving a person who uses Chasten the option of providing an OpenAI key and then sending some XML and a natural language description of a query to OpenAI ChatGPT-3.5-turbo. We could then return back an XPath expression that is likely to meet the query and then give the person using the tool the option of adding it to their checks.yml configuration file.