新しい投稿

検索

記事
· 2025年3月31日 2m read

Operate the database through dialogue

Prompt

Firstly, we need to understand what prompt words are and what their functions are.

Prompt Engineering

Hint word engineering is a method specifically designed for optimizing language models.
Its goal is to guide these models to generate more accurate and targeted output text by designing and adjusting the input prompt words.

Core Functions of Prompts

  • Improve content matching: By accurately expressing your needs, AI can generate high-quality content that better meets expectations
  • Efficiency and time optimization: A clear prompt can directly obtain the desired answer, reducing the time for repeated adjustments and greatly improving efficiency.
  • Easy to program: AI can return corresponding content according to its own needs, making it easier to process

 Application Introduction

The iris-data-analysis application is actually a simple demo using prompt words,It can process the database through dialogue, using AI AgentBO.OpenAI configuration URL APIKEY 、 And the Model name, to call the AI interface.By using prompt words to prompt AI to return the required SQL, we can process and execute the SQL returned by AI to obtain the data we need.

Example

For example, I would like to know AI_Agent_DB.UserInfo  How many male users and how many female users are in the UserInfo table? I can write the prompt words like this

text

As an SQL expert, please generate appropriate SQL statements based on the following requirements:
demand:{"message"}
Please only return SQL statements without any further explanation. If creating a table, please include appropriate field types and necessary constraints.

 

 

 

AI will only return SQL in the conversation with you for subsequent operations, and also vectorize the requested message to view the similarity of the problem through vector retrieval.

and also vectorize the requested message to view the similarity of the problem through vector retrieval.

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください
記事
· 2025年3月31日 2m read

<METHOD DOES NOT EXIST> Errors For Record Map Objects

The complex record mapper can help you process text file data consisting of various types of records to persistent messages in IRIS. To gain a basic understanding of the complex record mapper and see an example implemented in the production, check out the learning services video below:

https://community.intersystems.com/post/video-using-complex-record-mapper

This article is going to help troubleshoot when you see <Method DOES NOT EXIST> when handling record objects. For example, when purging messages in the production, you might see errors that indicate issues when deleting certain records:
<METHOD DOES NOT EXIST>zDeleteRecords+17^User.Test.Batch.1 *%ParentRemove,User.Test.Record

Alternatively, you might see the below message in the event log when processing files using a complex record map:
<METHOD DOES NOT EXIST>updateArrayReferences+40^EnsLib.RecordMap.ComplexParent.1 *%ParentAdd,User.Test.Record

Checking the class specified in the message, you find that the method indicated after the asterisk is indeed not included in the record class. Why is the class missing these methods?

When you see this error, in the management portal, go to Interoperability>List>Record Maps, and go to the page for the record map in question ("User.Test.Record" in this case). Check the settings to see if "Allow Complex Record Mapping" or "Allow Complex Batching" is checked.

If you use a record type in a complex record map, you need to configure the simple record map to be able to use it in the complex record map. The documentation specifies that "Allow Complex Batching" is a "flag that specifies whether record map can be used in a complex record map." 

When you check the "Allow Complex Batching" setting, the record class extends EnsLib.RecordMap.ComplexChild; when you don't, the class extends only %Persistent. You need to check this option for all the records you use in the complex record map. 

In the example above, you see that the *%ParentRemove method is not defined because the EnsLib.RecordMap.ComplexChild class defines it. If the record class doesn't extend EnsLib.RecordMap.ComplexChild, it doesn't contain the %ParentRemove method. Thus, we got the error when trying to purge it.

To remedy this, check "Allow Complex Record Mapping" for the record and regenerate the class. If you check the regenerated class, you will see that it now extends the EnsLib.RecordMap.ComplexChild class. The purge should now work as expected.

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください
お知らせ
· 2025年3月31日

[Video] Security - Granular Access Control to Files with Fapolicyd

Hi Community,

Enjoy the new video on InterSystems Developers YouTube:

⏯   Security - Granular Access Control to Files with Fapolicyd @ Global Summit 2024

In addition to the settings InterSystems provides for SELinux, Red Hat will now also offer support for fapolicyd, which extends components not covered by SELinux. Watch this video for a quick overview of SELinux, followed by an introduction to fapolicyd and a deeper dive on essential aspects.

Presenters
🗣 @Andreas Dieckow​​​​​, Principal Product Manager, InterSystems
🗣 Amy Farley, Senior Product Manager, RedHat

Stay ahead of the curve! Watch the video and subscribe to keep learning! 👍

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください
質問
· 2025年3月31日

Object mapping between Pydantic and %RegisteredObject

I'm exploring this right now: given a bunch of types defined as Pydantic models, how can I come up with an equivalent %RegisteredObject/%SerialObject and convert to/from (e.g., to support persistence and match validation as much as possible)?

People who know Python better than I do (e.g., your average undergraduate from this decade): is this a stupid idea or a cool idea? Has anyone else done this before?

5 Comments
ディスカッション (5)2
続けるにはログインするか新規登録を行ってください
ダイジェスト
· 2025年3月31日

Publicações Desenvolvedores InterSystems, Março 24 - 30, 2025, Resumo