Article Alberto Fuentes · Sep 16 4m read

In the previous article, we saw how to build a customer service AI agent with smolagents and InterSystems IRIS, combining SQL, RAG with vector search, and interoperability.

In that case, we used cloud models (OpenAI) for the LLM and embeddings.

This time, we’ll take it one step further: running the same agent, but with local models thanks to Ollama.

0
0 0
Article Alberto Fuentes · Sep 1 7m read

Customer support questions span structured data (orders, products 🗃️), unstructured knowledge (docs/FAQs 📚), and live systems (shipping updates 🚚). In this post we’ll ship a compact AI agent that handles all three—using:

  • 🧠 Python + smolagents to orchestrate the agent’s “brain”
  • 🧰 InterSystems IRIS for SQL, Vector Search (RAG), and Interoperability (a mock shipping status API)
0
0 0
Article Alberto Fuentes · Jan 24 8m read

In the world of APIs, REST is very extended. But what happens when you need more flexibility in your data-fetching strategies? For instance letting the client to choose what fields is going to receive. Enter GraphQL, a query language for your APIs that provides a flexible alternative to REST.

In this post, we will:

  • Compare REST and GraphQL.
  • Dive into the basics of GraphQL: Queries, Mutations, and HTTP.
  • Build a simple GraphQL server implementation using Graphene, SQLAlchemy, and Flask over data in InterSystems IRIS.
  • Explore how to deploy your GraphQL server as a WSGI application in IRIS.
0
0 0
Article Alberto Fuentes · Mar 4, 2024 2m read

I would like to share with you a little trick to customize how messages are displayed in the Message Viewer. In particular, how you can display messages as JSON (instead of the default XML representation).

Messages are objects that are used to communicate interoperability productions components. In my example I have defined a message that later I serialize as JSON to send to an external API. This message is defined as a regular message and also as a %JSON.Adaptor so I can export / import directly to or from JSON.

0
0 425
Article Alberto Fuentes · Jan 29, 2024 12m read

We have a yummy dataset with recipes written by multiple Reddit users, however most of the information is free text as the title or description of a post. Let's find out how we can very easily load the dataset, extract some features and analyze it using features from OpenAI large language model within Embedded Python and the Langchain framework.

Loading the dataset

First things first, we need to load the dataset or can we just connect to it?

2
2 381
Article Alberto Fuentes · Feb 28, 2023 2m read

Hi all!

I'm sharing a tool for data ingestion that we have used in some projects.

DataPipe is an interoperability framework for data ingestion in InterSystems IRIS in a flexible way. It allows you to receive data from external sources, normalize and validate the information and finally perform whatever operation you need with your data.

Model

In first place, you need to define a model. A model is simply a class that extends from DataPipe.Model where you need to implement some methods:

0
1 627
Article Alberto Fuentes · Feb 23, 2023 3m read

Hi all!

In a project we needed to define topics to publish messages and register different subscribers which will receive those messages asynchronously. We also needed it to be as simple as possible and that we could use it on InterSystems IRIS directly.

As an experiment, I'm sharing this iris-pubsub open exchange example.

Infrastructure

This is built on top of InterSystems IRIS interoperability features, it needs a running production.

4
2 508
Article Alberto Fuentes · Sep 30, 2022 1m read

Hi developers!

Maybe you have to implement scenarios that don't require a FHIR repository, but forwarding FHIR requests, manage the responses and maybe run transformations or extract some values in between. Here you will find some examples that can be implemented using InterSystems IRIS For Health o HealthShare Health Connect.

In these examples I've used interoperability productions with FHIR Interoperability Adapter and HS.FHIRServer.Interop.Request messages.

First scenario build a FHIR requests from scratch (it could be from a file, or a SQL query) and then send it to an external FHIR service. image

0
1 515
Article Alberto Fuentes · May 26, 2022 1m read

Hi developers! have you ever implemented a DICOM integration? Maybe you have searched for an example, or even a simulator. Here you can find a example that may be useful.

DICOM is a message standard widely used in healthcare for diagnostic images.You can use DICOM standard in interoperability productions using both IRIS For Health and Health Connect, here you can find the documentation.

2
2 636
Article Alberto Fuentes · Apr 5, 2022 2m read

You have read about OAuth2 / OpenID Connect but you don't know how to use it? Have you ever needed to implement Single Sign-On (SSO) or secure web services based on tokens? Did you have to add authentication / authorization to your web applications or services and you didn't know how to start?

What about a step by step example where you can set up an authorization server, a client and a resource server? Here you can find an example where you will configure InterSystems IRIS instances to act as each one of these OAuth2 roles.

A brief introduction

1
4 1355
Article Alberto Fuentes · Feb 24, 2021 1m read

Hi Developers!  Let me share with you some exercises from a workshop about developing interoperability components in Java using PEX (Production EXtension).

You will find slides and step by step exercises about:

  • Understanding simple PEX components coded in Java.
  • Making some changes on them.

All built using containers, so you don't need to build a local Java environment.

You can reach the repository here: https://openexchange.intersystems.com/package/workshop-pex

6
0 425
Article Alberto Fuentes · Feb 24, 2021 1m read

Hi Community!  Today I'd like to share with you a link to some exercises from a workshop about developing REST APIs and how to manage them using InterSystems API Manager.

It includes step by step exercises to:

  • Developing REST APIs from OpenAPI specifications.
  • Adding the created API in an interoperability production (optional).
  • Basic API management in InterSystems API Manager (service, route, auth, consumers, rate limiting, etc.).
  • Some other more complex scenarios in InterSystems API Manager like load balancing, or routing by header.
0
0 336
Article Alberto Fuentes · Feb 18, 2021 2m read

Hi Community! 

I'm sharing a little tool (REST service) to download interoperability messages from your browser.

You only need to:

  1. Create a web application in Management Portal (e.g. /downloadmsg) and set DispatchClass=Util.DownloadMsg.
  2. Call the tool using your browser passing the namespace and the message header id to download. http://localhost:52773/downloadmsg/ns/mydev/msgid/17441
0
0 486
Article Alberto Fuentes · Oct 23, 2019 2m read

Would you like to be sure your data transforms work as expected with a single command? And what about writing unit tests for your data transforms in a quick and simple way? 

When talking about interoperability, there are usually a lot of data transforms involved. Those data transforms are used to convert data between different systems or applications in your code, so they are running a very important job.

Testing strategies

2
1 910
Article Alberto Fuentes · Feb 19, 2016 3m read

The attached file contains an example of code generation using ObjectGenerators which builds a very simple homemade RuleEngine. 

Code generation is an excellent way of increasing performance moving run-time calculations to compile-time.

We could generate code creating routines or implemeting methods using ObjectGenerators. In this example we are using ObjectGenerators.

Update: Rule Engine is now on GitHub https://github.com/intersystems-ib/cache-iat-ruleengine

A very simple code generated method

For starters, let's begin with a very basic code generated method:

0
0 938
Article Alberto Fuentes · Feb 19, 2016 1m read

Attached code contains a very basic $system.WorkMgr example.

It uses several jobs (workers) to update different chunks of rows of a table.

Steps:

  • Creates a table with 100 records.
  • Split table  in chunks 
  • Initialize WorkMgr and queue chunks to workers.
    • Every worker simply sets its process number in the Job field of the processed row. 

In this case, I have tested the example in a 8-core laptop:

1
0 924
Article Alberto Fuentes · Feb 19, 2016 2m read

The attached file contains two $system.Event examples that processes work asynchronously using persistent queues:

Events_Simple

This is a very basic example that creates some worker processes and then enqueue messages to them using $system.Event.

6
1 1296