Skip to content

Allow filters to be defined when calling VS tool #104

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

Merged
merged 13 commits into from
May 2, 2025
Merged

Allow filters to be defined when calling VS tool #104

merged 13 commits into from
May 2, 2025

Conversation

annzhang-db
Copy link
Contributor

@annzhang-db annzhang-db commented Apr 24, 2025

Description of changes

  • Pass filters through when invoking VS tool, and combine with filters defined at initialization time.

How is this tested?

  • Unit tests
  • Manual tests

Langchain
Screenshot 2025-04-29 at 10 35 02 PM

OpenAI
Screenshot 2025-04-29 at 10 01 52 PM

LlamaIndex
Screenshot 2025-04-29 at 10 51 12 PM

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>
Signed-off-by: Ann Zhang <ann.zhang@databricks.com>
Signed-off-by: Ann Zhang <ann.zhang@databricks.com>
@annzhang-db annzhang-db changed the title draft Allow filters to be defined when calling VS tool Apr 30, 2025
Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

update

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

update

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

update

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

update

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>
Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

update default description

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

update

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>
Signed-off-by: Ann Zhang <ann.zhang@databricks.com>
Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

keep import

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

ruff

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

add dependency

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>
Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

fix

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

update

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

update

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

make required

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

update

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

update

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

update

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

update

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

update

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

update

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>
Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

update openai tests

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

format

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

else case

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

lint

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>

improve unit tests

Signed-off-by: Ann Zhang <ann.zhang@databricks.com>
Signed-off-by: Ann Zhang <ann.zhang@databricks.com>
Signed-off-by: Ann Zhang <ann.zhang@databricks.com>
Signed-off-by: Ann Zhang <ann.zhang@databricks.com>
Signed-off-by: Ann Zhang <ann.zhang@databricks.com>
Copy link
Contributor

@aravind-segu aravind-segu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

'- Pattern match: {"column LIKE": "word"} (matches full tokens separated by whitespace)\n'
'- OR logic: {"column1 OR column2": [value1, value2]} '
"(matches if column1 equals value1 or column2 equals value2; matches are position-specific)"
),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm didnt realize llm is getting passed this. So a link wont be useful

if not name.startswith("__"):
columns.append((name, col_type, comment))

return "The vector search index includes the following columns:\n" + "\n".join(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty cool

@annzhang-db annzhang-db merged commit 64b46d8 into main May 2, 2025
6 checks passed
@annzhang-db annzhang-db deleted the filters branch May 2, 2025 07:48
annzhang-db added a commit that referenced this pull request May 7, 2025
Signed-off-by: Ann Zhang <ann.zhang@databricks.com>
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

Successfully merging this pull request may close these issues.

2 participants