Ontology Object Type + Link as context in AIP Logic

Hi!

I have an ontology object type with a linked type that I want to use as context in an AIP Logic block.

Goal:
Pass fields from an object plus fields from linked object as a string input to the LLM.

What I tried:
I found that I can include both the object and the linked object using the Query Tool inside the LLM block. However, I can’t filter rows with this approach. Without filtering, the query pulls all rows, which makes this approach not scalable. OSQL row limits does not solve the problem because row precedence is undefined.

How would I give fields from both objects from a filtered set as context?

Thank you!

Screenshot of current attempt below.

Below is tools query of whole object + linked in LLM block

1 Like

Hey Brandon

Thanks for sharing your question. it’s really interesting. Here’s what I tried:

  • I started off with a “search around” block to figure out the link type for the ontology object.
  • Then I added some filters(there is a ‘Filter‘ option within this search around block) within that block to focus on the specific properties I needed.
  • If you want to filter the first object type, you can also use a function block with a typescript function to apply the required filters.
  • Finally I used this search around block variable in the LLM block.
    Does this sound like it could work for you? Let me know your thoughts. Thanks!

1 Like