From 6a13072d16c5f2ed4cc321ac2b9e03443050f854 Mon Sep 17 00:00:00 2001 From: Vasilije <8619304+Vasilije1990@users.noreply.github.com> Date: Tue, 31 Oct 2023 11:45:22 +0100 Subject: [PATCH] Add base SQL query, rework docs a bit --- README.md | 9 ++--- .../example_data/base_sql_for_superset.sql | 34 +++++++++++++++++++ 2 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 level_3/example_data/base_sql_for_superset.sql diff --git a/README.md b/README.md index 6b35f24a2..385c30261 100644 --- a/README.md +++ b/README.md @@ -98,13 +98,13 @@ RAG test manager can be used via API or via the CLI #### Level 1 - OpenAI functions + Pydantic + DLTHub Scope: Give PDFs to the model and get the output in a structured format -Blog post: [Link] (https://prometh.ai/promethai-memory-blog-post-one) +Blog post: [Link](https://prometh.ai/promethai-memory-blog-post-one) We introduce the following concepts: - Structured output with Pydantic - CMD script to process custom PDFs #### Level 2 - Memory Manager + Metadata management Scope: Give PDFs to the model and consolidate with the previous user activity and more -Blog post: [Link] (https://www.notion.so/topoteretes/Going-beyond-Langchain-Weaviate-Level-2-towards-Production-98ad7b915139478992c4c4386b5e5886?pvs=4) +Blog post: [Link](https://www.notion.so/topoteretes/Going-beyond-Langchain-Weaviate-Level-2-towards-Production-98ad7b915139478992c4c4386b5e5886?pvs=4) We introduce the following concepts: - Long Term Memory -> store and format the data @@ -115,7 +115,7 @@ We introduce the following concepts: #### Level 3 - Dynamic Graph Memory Manager + DB + Rag Test Manager Scope: Store the data in N-related stores and test the retrieval with the Rag Test Manager -Blog post: [Link] (https://topoteretes.notion.site/Going-beyond-Langchain-Weaviate-Level-3-towards-production-e62946c272bf412584b12fbbf92d35b0?pvs=4) +Blog post: [Link](https://topoteretes.notion.site/Going-beyond-Langchain-Weaviate-Level-3-towards-production-e62946c272bf412584b12fbbf92d35b0?pvs=4) - Dynamic Memory Manager -> store the data in N hierarchical stores - Auto-generation of tests - Multiple file formats supported @@ -175,7 +175,8 @@ Inspect the results in the DB: ``` select * from test_outputs; ``` -Or set up the superset to visualize the results: +Or set up the superset to visualize the results. +The base SQL query is in the example_data folder. diff --git a/level_3/example_data/base_sql_for_superset.sql b/level_3/example_data/base_sql_for_superset.sql new file mode 100644 index 000000000..ec553bc6a --- /dev/null +++ b/level_3/example_data/base_sql_for_superset.sql @@ -0,0 +1,34 @@ + +SELECT + ts.id AS test_set_id, + too.id AS test_output_id, + op.id AS operation_id, + ts.user_id AS test_set_user_id, + ts.content AS test_set_content, + ts.created_at AS test_set_created_at, + ts.updated_at AS test_set_updated_at, + too.set_id AS test_output_set_id, + too.user_id AS test_output_user_id, + too.test_set_id AS test_output_test_set_id, + too.operation_id AS test_output_operation_id, + too.test_params AS test_output_test_params, + too.test_result AS test_output_test_result, + too.test_score AS test_output_test_score, + too.test_metric_name AS test_output_test_metric_name, + too.test_query AS test_output_test_query, + too.test_output AS test_output_test_output, + too.test_expected_output AS test_output_test_expected_output, + too.test_context AS test_output_test_context, + too.test_results AS test_output_test_results, + too.created_at AS test_output_created_at, + too.updated_at AS test_output_updated_at, + op.user_id AS operation_user_id, + op.operation_type AS operation_operation_type, + op.operation_params AS operation_operation_params, + op.test_set_id AS operation_test_set_id, + op.created_at AS operation_created_at, + op.updated_at AS operation_updated_at +FROM public.test_sets ts +JOIN public.test_outputs too ON ts.id = too.test_set_id +JOIN public.operations op ON op.id = too.operation_id +where operation_status ="COMPLETED"; \ No newline at end of file