Skip to content

Amazon Bedrock - Retrieve and RetrieveAndGenerate#39500

Merged
o-nikolas merged 7 commits intoapache:mainfrom
aws-mwaa:ferruzzi/bedrock/m6-bedrock-rag
May 15, 2024
Merged

Amazon Bedrock - Retrieve and RetrieveAndGenerate#39500
o-nikolas merged 7 commits intoapache:mainfrom
aws-mwaa:ferruzzi/bedrock/m6-bedrock-rag

Conversation

@ferruzzi
Copy link
Copy Markdown
Contributor

@ferruzzi ferruzzi commented May 8, 2024

Both of these calls are super fast and neither has any kind of waiter or means of checking the status, so here can not be any sensor or trigger for them. They are simple client calls, but I think making these Operators allowed us to simplify the complicated formatting on the client API call itself, for a better UX.

One question I have is the parameter name for input and query. I feel like these should be standardized, but also we usually go out of our way to stick as close as possible to the API call's parameter names. Let me know what you think. For InvokeModel I used "input_data", I could standardize all three on that name or just leave them as I have here.

All related unit tets, CI, and build-docs pass locally.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@ferruzzi ferruzzi force-pushed the ferruzzi/bedrock/m6-bedrock-rag branch from 87c3f83 to 65453f4 Compare May 8, 2024 21:17
@ferruzzi ferruzzi changed the title Amaazon Bedrock - Retrieve and RetrieveAndGenerate Amazon Bedrock - Retrieve and RetrieveAndGenerate May 8, 2024
@ferruzzi
Copy link
Copy Markdown
Contributor Author

Ran it using the system test trigger script and it passes with the external sources getting skipped:

INFO  [tests.system.utils] EXECUTION SUMMARY:
╒═════════════════════════════════════════════════╤══════════╕
│ Task ID                                         │ Status   │
╞═════════════════════════════════════════════════╪══════════╡
│ variable_fetcher                                │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ create_bucket                                   │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ create_opensearch_policies                      │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ create_collection                               │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ await_collection                                │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ get_collection_arn                              │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ create_vector_index                             │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ copy_data_to_s3                                 │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ create_knowledge_base                           │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ await_knowledge_base                            │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ create_data_source                              │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ ingest_data                                     │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ await_ingest                                    │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ knowledge_base_rag                              │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ external_sources_rag_group.external_sources_rag │ skipped  │
├─────────────────────────────────────────────────┼──────────┤
│ external_sources_rag_group.run_or_skip          │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ external_sources_rag_group.end_workflow         │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ retrieve                                        │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ delete_data_source                              │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ delete_knowledge_base                           │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ delete_vector_index                             │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ delete_opensearch_policies                      │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ delete_collection                               │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ delete_bucket                                   │ success  │
├─────────────────────────────────────────────────┼──────────┤
│ watcher                                         │ skipped  │
╘═════════════════════════════════════════════════╧══════════╛
======================== 1 passed in 423.02s (0:07:03) =========================

@o-nikolas o-nikolas merged commit 9284dc5 into apache:main May 15, 2024
@o-nikolas o-nikolas deleted the ferruzzi/bedrock/m6-bedrock-rag branch May 15, 2024 18:34
romsharon98 pushed a commit to romsharon98/airflow that referenced this pull request Jul 26, 2024
Both of these calls are super fast and neither has any kind of waiter or means of checking the status, so here can not be any sensor or trigger for them. They are simple client calls, but I think making these Operators allowed us to simplify the complicated formatting on the client API call itself, for a better UX.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants