Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with AI Agent using vector store tool (Supabase) #11173

Open
lucasvnd opened this issue Oct 9, 2024 · 2 comments
Open

Issue with AI Agent using vector store tool (Supabase) #11173

lucasvnd opened this issue Oct 9, 2024 · 2 comments
Labels
in linear Issue or PR has been created in Linear for internal review

Comments

@lucasvnd
Copy link

lucasvnd commented Oct 9, 2024

Bug Description

I'm currently using the AI Agent (Tools Agent) node in a workflow where the agent is utilizing the Supabase Vector Store Tool to retrieve information from a venue. The Vector Store Tool is attached to the OpenAI model (I have tried both GPT-4 and GPT-4 mini), and this is connected to the Supabase Vector Store. The embedding model in use is OpenAI small, and while it works intermittently, I frequently encounter an error with the message:

"Cannot read properties of undefined (reading 'replace')"

When I switch the model to an alternative one (Anthropic, Google Gemini, or even another OpenAI model), it starts working again, but after some further tests, the same error reappears. This inconsistency is affecting my workflow reliability.

It's unclear what is causing this behavior, but it appears to be related to the OpenAI model interaction, as switching models temporarily resolves the issue.

To Reproduce

1 - Add a Supabase Vector Store Tool node to the workflow, connected to the OpenAI model (e.g., GPT-4 or GPT-4 mini).
2 - Set up the Vector Store Tool to retrieve embeddings from Supabase, using the OpenAI small embedding model.
3 - Query the AI Agent node to retrieve information.
4 - Observe that the workflow sometimes returns the error: Cannot read properties of undefined (reading 'replace').
5 - Switch to an alternative model (Anthropic, Google Gemini, or another OpenAI model).
6 - Run the query again. The issue temporarily resolves but reoccurs after some time.

Expected behavior

The AI Agent should consistently query the vector store tool without any issues, while this happens intermittently, I can't see the reason why.

Operating System

Docker

n8n Version

1.56.1

Node.js Version

Don't know

Database

PostgreSQL

Execution mode

main (default)

@Joffcom
Copy link
Member

Joffcom commented Oct 9, 2024

Hey @lucasvnd,

We have created an internal ticket to look into this which we will be tracking as "GHC-297"

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label Oct 9, 2024
@Joffcom
Copy link
Member

Joffcom commented Oct 17, 2024

Hey @lucasvnd,

Can you share a workflow that reproduces this as we are not able to reproduce it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review
Projects
None yet
Development

No branches or pull requests

2 participants