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

Is it possible to parameters to the vector retrieval query ? #82

Open
BLaZeKiLL opened this issue Nov 2, 2023 · 4 comments
Open

Is it possible to parameters to the vector retrieval query ? #82

BLaZeKiLL opened this issue Nov 2, 2023 · 4 comments

Comments

@BLaZeKiLL
Copy link

Hi,

I was wondering if it is possible to pass some parameters to the vector index retrieval query (similar to the one in chains.py:142). The value of these parameters depends on user input. I want to retrieve different sets of indexes depending on the user input.

In my query, I have the following match clause.

MATCH (question) -[:SITE]-> (s:Site {name: $site_name})

$site_name will depend on user input

@tomasonjo
Copy link
Collaborator

At the moment, there is no clean way to pass parameters to the query. What you could do is to instantiate a Neo4jVector object for each site, and then use the appropriate based on the input parameter

@BLaZeKiLL
Copy link
Author

Okay, For now, I implemented a chain factory and used string interpolation for the query, not ideal but it's working

@jexp
Copy link
Collaborator

jexp commented Nov 3, 2023

But good idea to make it configurable and allow external parameters to be used in the query
@tomasonjo esp. if we integrate it into the LangChain parameter passing between chains. Can you make a note of that or GH issue in LC?

@BLaZeKiLL
Copy link
Author

Hi,

I created Neo4j Vector Store connector for Semantic Kernel; I make the retrieval query configurable by providing an overridable query factory and a Dynamic properties dictionary.

The user can update the values in the dictionary at runtime and override the query factory to consume the required keys from the dictionary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants