Nova postagem

Pesquisar

Artigo
· Maio 27, 2024 4min de leitura

Studio IRIS AI Studio: Playground para explorar as capacidades RAG sobre as incorporações de vetores da IRIS DB

No artigo anterior, vimos detalhes a respeito dos conectores, que permitem que o usuário carregue o arquivo, o converta para incorporações e armazene na IRIS DB. Nesse artigo, vamos explorar opções diferentes de recuperações que o Studio IRIS AI oferece: Semantic Search (pesquisa semântica), Chat (conversa), Recommender (recomendação) e Similarity (similaridade).

Novas atualizações  ⛴️ 

  • Adicionada instalação pelo Docker. Rode `./build.sh` após clonagem para ter a aplicação e a instância IRIS rodando na sua máquina local.
  • Conecte via InterSystems Extension no vsCode - Graças ao @Evgeny Shvarov 
  • Adicionado FAQ's na página principal que cobre a informação básica para novos usuários.

Semantic Search - Pesquisa semântica

Semantic Search é um método para recuperar dados que busca entender a intenção do usuário e o contexto da consulta ao invés de  somente palavras chave que combinam. Ele considera a relações entre palavras e conceitos, indo além de uma simples combinação de palavras chave.

A construção através da criação de índice e carregamento de dados na IRIS DB foi coberta no artigo anterior, no código de Connectors, e agora começamos com o índice e rodamos a máquina de consulta:

Ref. a `query_llama.py`

query_engine = index.as_query_engine()
response = query_engine.query(query)

 

Chat Engine - Máquina de Chat

A Chat Engine - máquina de chat aumenta o conteúdo carregado e age como uma versão de estados da máquina de consult "query_engine" anterior. Ela mantém o rastreio do histórico da conversa e pode responder perguntas com esse contexto passado em "mente".

Ref. a `chat_llama.py`

chat_engine = index.as_chat_engine(chat_mode='condense_question')
response = chat_engine.chat(user_message)

 

Recommender - Recomendador

O Recommender - Recomendador é similar aos sistemas de recomendação usados nos sites de e-commerce, onde produtos similares são exibidos abaixo do produto que procuramos. O Recommender and Similarity RAG (Retrieval-augmented generation) - RAG (Geração aumentada de recuperação) de Recomendação e Similaridade também cai em aspectos similares, mas no Recommender, você pode escolher o modelo de rankeamento LLM (Large Language Model - Grande Modelo de Linguagem) a ser usado.

Ref. to `reco_llama.py`

if reco_type == 'cohere_rerank':
    cohere_rerank = CohereRerank(api_key=cohere_api_key, top_n=results_count)
    query_engine = index.as_query_engine(
        similarity_top_k=10,
        node_postprocessors=[cohere_rerank],
    )
    response = query_engine.query(query)

elif reco_type == 'openai_rerank':
    rankgpt_rerank = RankGPTRerank(
        llm=OpenAI(
            model="gpt-3.5-turbo-16k",
            temperature=0.0,
            api_key=openai_api_key,
        ),
        top_n=results_count,
        verbose=True,
    )
    query_engine = index.as_query_engine(
        similarity_top_k=10,
        node_postprocessors=[rankgpt_rerank],
    )
    response = query_engine.query(query)

Similarity - Similaridade

O recurso Similarity - Similaridade retorna uma pontuação de similaridade, que ajuda a avaliar a qualidade do sistema de respostas via similaridade semântica. Você pode filtrar os resultados baseados em um mínimo de pontuação de similaridade e o número de intens similares para retornar da base DB (Database - Base de Dados)

Ref. a `similarity_llama.py`

retriever = index.as_retriever(similarity_top_k=top_k)
nodes = retriever.retrieve(query)

 

Ao nivelar essas diferentes opções de recuperação de dados no Stuio IRIS AI, incluindo Semantic Search, Chat Engine, Recommender e Similarity, os usuários podem explorar o potencial dos seus dados. Esses atributos permitem recuperação avançada de informações, respostas a perguntas de contexto, recomendações pessoais e análises de similaridade semântica, empoderando usuários a obter percepções valiosas e fazer decisões baseadas nos dados (ao menos para construir similares no seu domínio).

By leveraging these different retrieval options at IRIS AI Studio, including Semantic Search, Chat Engine, Recommender, and Similarity, users can explore the potential of their data. These features enable advanced information retrieval, contextual question answering, personalized recommendations, and semantic similarity analysis, empowering users to derive valuable insights and make data-driven decisions (at least to build similar ones in their domain).

🚀 Vote por essa aplicação na competição de Vector Search, GenAI and ML, se acreditar que ela tem futuro!

Fique à vontade para compartilhar qualquer feedabck ou entradas que tiver. Obrigado.

Discussão (0)1
Entre ou crie uma conta para continuar
Anúncio
· Maio 27, 2024

The 3rd InterSystems Ideas Contest

Hello Community,

We're super excited to invite all our Developer Community members (both InterSystems employees and not) to participate in our next contest!

💡 The 3rd InterSystems Ideas Contest 💡

We're looking for your innovative ideas to enhance InterSystems IRIS and related products and services. We encourage suggestions based on real-life use cases, highlighting the tangible benefits your idea will bring to other users and how it will enhance developers' experiences with InterSystems technology.

📅 Duration: June 10 - July 7, 2024

🏆 Prizes for the best ideas!

🎁 Gifts for everyone: A special gift will be given to each author whose idea is accepted in the contest.

 

>> VOTE FOR THE BEST IDEAS HERE <<

Accepted ideas should:

  • be created during the Ideas Contest period by a user registered on the InterSystems Ideas portal (you can log in via InterSystems SSO);
  • not be part of other already existing ideas - only new ideas are allowed;
  • not describe the existing functionality of InterSystems IRIS and related Products or Services;
  • be posted in English;
  • be written by a person, not generated by AI;
  • be specific rather than general, with an explanation of how this exact change will benefit users and is linked to a real-life use case;
  • be accepted as meaningful by InterSystems experts.

All ideas are subject to moderation. We may request to clarify the submitted idea. Ideas that meet the requirements will receive a special "Ideas Contest" status.

Who can participate?

We invite EVERYONE to join our new Ideas Contest. Both InterSystems employees and non-employees are welcome to participate and submit their ideas. 

Prizes

1. Participation gift - authors of all accepted ideas will get:

🎁 Branded T-shirt with InterSystems logo (unisex)

2. Expert award - the 3 best ideas will be selected by InterSystems experts. Winners will get:

🥇 1st place - JBL Tour Pro wireless Noise Cancelling earbuds

🥈 2nd place - Patagonia Unisex Nano Puff® Vest

🥉 3rd place -  LEGO Vespa 125 / Corvette / NASA Mars Rover Perseverance / Kawasaki Ninja H2R Motorcycle

3. Community Award - an idea with the most votes will get:

🎁 LEGO Vespa 125 / Corvette / NASA Mars Rover Perseverance / Kawasaki Ninja H2R Motorcycle

Note: InterSystems employees can only get the participation prize. Expert and Community awards can only be won by non-InterSystems members of the Community. 

Contest period

⚠️ Idea Submission: June 10 - 30

✅ Voting for ideas: July 1 - 7

🎉 Winners announcement: July 8

We encourage you to share your ideas on the Ideas portal during this period. Registered members can participate by voting and providing comments on published ideas.

Note: only votes from active Community users who have made at least one post on the Developer Community are counted for the Community Award.

--

Post your idea(s) on the InterSystems Ideas portal, and stay tuned for your idea's status updates:

>> VOTE FOR THE BEST IDEAS HERE <<

Good luck! 🍀 


Note: All prizes are subject to availability and shipping options. Some items may not be available for international shipping to specific countries, in this case, an equivalent alternative will be provided. We will let you know if a prize is not available and offer a possible replacement. Prizes cannot be delivered to residents of Crimea, Russia, Belarus, Iran, North Korea, Syria, or other US-embargoed countries.

5 Comments
Discussão (5)2
Entre ou crie uma conta para continuar
Pergunta
· Maio 27, 2024

Connecting to IRIS Database Using py.odbc

Hi everybody,
I am trying to connect with an IRIS database where to retrieve data and import them to SQL server but the access gets denied.
I would appreciate your help,
Thank you,
Jeb

I have following information:

Data Source Name --> I use it as the server name

Host(IP Address)

Port

Namespace --> I could use it in my script

import pyodbc

5 Comments
Discussão (5)2
Entre ou crie uma conta para continuar
Pergunta
· Maio 27, 2024

Benefit of custom FHIR profile usage

Hi folks,

I am working on a customer project which uses some slightly altered FHIR resources in comparison to default R4 patient resource. I am able to import the structuedefinition as a custom FHIR package and assign it to the ISC FHIR server and the endpoint the IRIS instance provides.

My question is - what is the benefit of using such a custom profil only defining some changes on a resources default definition (e.g. in field optionality)? From my understanding the ISC FHIR server does not validate resources it receives. Furthermore from the custom structure definition of the above mentioned FHIR patient resource no objects/classes or definitions are generated to be used later on.

best regards,
Sebastian

3 Comments
Discussão (3)2
Entre ou crie uma conta para continuar
Resumo
· Maio 27, 2024