Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ tool_resources:
Search1:
name: "{{ source('cortex', 'policy_search_service') }}"
max_results: 5
filter:
"@eq":
region: "North America"
title_column: "title"
id_column: "doc_id"
```
Expand Down
30 changes: 30 additions & 0 deletions integration_tests/models/agent_with_search.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{{
config(
materialized = 'cortex_agent',
comment = 'Agent with a Cortex Search tool (compile-only: no live search service in test env)',
profile = {'display_name': 'Search Agent', 'color': 'teal'}
)
}}
models:
orchestration: claude-4-sonnet
orchestration:
budget:
seconds: 30
tokens: 16000
instructions:
response: "Be concise."
orchestration: "Use PolicySearch for policy questions."
tools:
- tool_spec:
type: "cortex_search"
name: "PolicySearch"
description: "Searches policy documents."
tool_resources:
PolicySearch:
name: "{{ source('cortex_test', 'policy_search_service') }}"
max_results: 5
filter:
"@eq":
region: "North America"
title_column: "title"
id_column: "doc_id"
3 changes: 3 additions & 0 deletions integration_tests/models/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ models:

- name: agent_raw_ddl
description: "Cortex Agent created via raw_ddl pass-through mode."

- name: agent_with_search
description: "Cortex Agent with a Cortex Search tool; verifies full tool_resources syntax including filter, max_results, title_column, id_column."
9 changes: 9 additions & 0 deletions integration_tests/models/sources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2

sources:
- name: cortex_test
database: "{{ env_var('SNOWFLAKE_TEST_DATABASE', 'DEV') }}"
schema: "{{ env_var('SNOWFLAKE_TEST_SCHEMA', 'PUBLIC') }}"
tables:
- name: policy_search_service
description: "Placeholder source for compile-time resolution of Cortex Search service."
2 changes: 1 addition & 1 deletion scripts/run_integration_tests_snowflake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ echo "==> Installing dbt dependencies"
dbt deps --target snowflake

echo "==> Running dbt build"
dbt build --target snowflake
dbt build --target snowflake --exclude agent_with_search

echo "==> Asserting agents exist"
dbt run-operation assert_agents_exist --target snowflake
Expand Down
Loading