-
Notifications
You must be signed in to change notification settings - Fork 13
feat: Initial development of seed eval dataset generation #139
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
Open
chen0040
wants to merge
24
commits into
feat/golden-dataset-generation
Choose a base branch
from
feat/golden-dataset-generation-seed-v1
base: feat/golden-dataset-generation
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
15fefdb
Refactor project structure, enhance CI/CD, and update dependencies (#…
chen0040 5fcf7a9
initial development of seed eval gen
chen0040 d8c8b76
remove the GEMINI_API_KEY environment variable
chen0040 6348001
update ci/cd to fix the gcrun issue
chen0040 a845366
revert ci/cd
chen0040 b535616
update the ci/cd based on main branch changes
chen0040 b077958
minor update on substitutionOption
chen0040 4e592e1
fix the missing build-extension id
chen0040 7c472ec
make sure that the seed golden appears in the gcbrun output
chen0040 459f130
bug fix on ruff check and pytest
chen0040 f7ace07
more bug fix on ruff check and pytest
chen0040 31ccff7
more bug fix on ruff check and pytest
chen0040 26c4a24
fix cloudbuild
chen0040 64c399f
address code agent comments
chen0040 6498f2a
address code agent comments
chen0040 7f9ee9a
debug skill not invoked
chen0040 ab85419
pure skill implementation
chen0040 571dfce
simplified mock app code
chen0040 fbc7ba9
simplified mock app code
chen0040 a378686
simplified mock app code
chen0040 c079ed2
restructure the cuj folders and update skill to make it more selectiv…
chen0040 29c08ed
minor update to improve the skill.md
chen0040 18fad80
improve the execution guard for edge case
chen0040 627ff13
separate evals for seed-eval-gen for ci/cd
chen0040 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| #!/usr/bin/env bash | ||
| # Run a single evalbench suite in an isolated working directory. | ||
| # | ||
| # Invoked from .ci/cloudbuild.yaml. Required env vars: ADC_KEY, | ||
| # GEMINI_API_KEY, EVAL_GCP_PROJECT_ID, EVAL_GCP_PROJECT_REGION. | ||
| # Required argument: <suite-name> (e.g. core-cujs, freeform-input). | ||
|
|
||
| set -e | ||
|
|
||
| SUITE="${1:?usage: run_eval.sh <suite-name>}" | ||
|
|
||
| if [ ! -f /workspace/SHOULD_RUN ]; then | ||
| echo "Evals disabled by preflight; skipping ${SUITE}." | ||
| exit 0 | ||
| fi | ||
|
|
||
| # ADC setup | ||
| echo "${ADC_KEY}" > /tmp/adc.json | ||
| chmod 600 /tmp/adc.json | ||
| export GOOGLE_APPLICATION_CREDENTIALS=/tmp/adc.json | ||
|
|
||
| # Isolate: copy this suite into its own working directory so parallel | ||
| # runs don't fight over the same .venv / fake_home / .gemini/tmp state. | ||
| WORK_DIR="/workspace/eval-${SUITE}" | ||
| mkdir -p "${WORK_DIR}" | ||
| cp -r "/workspace/evals/${SUITE}" "${WORK_DIR}/" | ||
| cd "${WORK_DIR}" | ||
|
|
||
| # Point model.yaml at the locally built extension and inject the Gemini API | ||
| # key into the CLI's env (orchestrator auth — the extension itself no longer | ||
| # needs the key, so we no longer touch the `settings: {}` block). | ||
| sed -i 's|https://github.com/GoogleCloudPlatform/db-context-enrichment|/workspace/staging|g' "${SUITE}/model.yaml" | ||
|
|
||
| # Inject Vertex project/location into the CLI env block so the extension can | ||
| # talk to the right GCP project without the values being committed to the repo. | ||
| sed -i \ | ||
| -e "/^ GEMINI_MODEL:/a\\ GOOGLE_CLOUD_PROJECT: \"${EVAL_GCP_PROJECT_ID}\"" \ | ||
| -e "/^ GEMINI_MODEL:/a\\ GOOGLE_CLOUD_LOCATION: \"${EVAL_GCP_PROJECT_REGION}\"" \ | ||
| "${SUITE}/model.yaml" | ||
|
|
||
| # evalbench runtime | ||
| export PYTHONPATH=/evalbench:/evalbench/evalproto | ||
| export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python | ||
|
|
||
| echo "Launching ${SUITE} evaluation..." | ||
| uv run --no-sync --project /evalbench python /evalbench/evalbench/evalbench.py --experiment_config="${SUITE}/run.yaml" | ||
|
|
||
| touch "/workspace/EVAL_RAN_${SUITE}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 3.12 | ||
| 3.12.13 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
|
|
||
| ## CUJ: case_flights | ||
|
|
||
| **Setup**: In this CUJ, the user only provides the https://docs.cloud.google.com/alloydb/docs/ai/integrate-applications-data-agent documentation link. | ||
|
|
||
| **Source**: database is `db_dummy`, which does not contain any table. | ||
|
|
||
| **Expected Outcome**: The eval dataset generator needs to figure out based on the documentation at https://docs.cloud.google.com/alloydb/docs/ai/integrate-applications-data-agent what NL-SQL pairs to generate. | ||
|
|
||
|
|
||
| ## CUJ: case_property_search | ||
|
|
||
| **Setup**: In this CUJ, the user only provides the github link https://github.com/kupp0/multi-db-property-search-data-agents. | ||
|
|
||
| **Source**: database is `search`, which contains test data for the app. | ||
|
|
||
| **Expected Outcome**: The eval dataset generator needs to figure out based on the application source codes at https://github.com/kupp0/multi-db-property-search-data-agents what NL-SQL pairs to generate. | ||
|
|
||
| ## CUJ: case_blog | ||
|
|
||
| **Setup**: In this CUJ, the user provides the `app_data` folder containing a `ER_Diagram.jpg` which sketch the ER diagram for blog application as well as its `design_doc.pdf`. | ||
|
|
||
| **Source**: database is `db_dummy`, which does not contain any table. | ||
|
|
||
| **Expected Outcome**: The eval dataset generator need to figure out that the `<source>-list-schemas` returns the empty schema (since the user did not create any table in the schema), infers the schema from the `ER_Diagram.jpg` and makes use of the content in the `design_doc.pdf` to generate NL-SQL pairs. | ||
|
|
||
| ## CUJ: case_ecommerce_cryptic | ||
|
|
||
| **Setup**: In this CUJ, the user provides a business context doc containing explaination over the cryptic column names in the database | ||
|
|
||
| **Source**: database is `db_ecommerce_cryptic`, which contains cryptic column names | ||
|
|
||
| **Expected Outcome**: The eval dataset generator needs to figure out how to generate NL which leverage domain knowledge from the business context doc which explains the cryptic column names, and its corresponding SQL only knows the cryptic column names. | ||
|
|
||
| ## CUJ: case_financials | ||
|
|
||
| **Setup**: In this CUJ, the user provides the querylog file `querylog.txt` which simulates the query log for the `financials` database. | ||
|
|
||
| **Source**: database is `financials` from BIRD. | ||
|
|
||
| **Expected Outcome**: The eval dataset generator needs to figure out how to extract the SQL from the query log, and then translate them to the corresponding NL while ensuring the NL is unambiguous and logically align with the SQL. In the case the number of pairs user ask is more than the SQLs in the querylog, the eval dataset generator needs to uses its knowledge and inspection of querylog to come up with more NL-SQL pairs. | ||
|
|
||
| ## CUJ: case_hr | ||
|
|
||
| **Setup**: In this CUJ, the user provides the `app_data` directory containing the application codes. | ||
|
|
||
| **Source**: database is the `db_hr`. | ||
|
|
||
| **Expected Outcome**: The eval dataset generator needs to figure out which tables and columns to use to generate NL-SQL so that it alighns with the application codes. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?