Skip to content
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

Gml 1824 regression test with cypher support and no hallucination and usefulness check #248

Merged
merged 49 commits into from
Jul 18, 2024

Conversation

luzhoutg
Copy link
Contributor

@luzhoutg luzhoutg commented Jul 15, 2024

regression test with cypher support only but not hallucination and usefulness check

  1. fixed the inconsistent results in transaction fraud
  2. separated input data to question and conversation in question_for_agent
  3. added conversation in the prompt of map question to schema
  4. modified the prompt in generate answer to use all information in context
  5. removed hallucination checker and usefulness for 0.9.

RobRossmiller-TG and others added 30 commits June 26, 2024 14:36
…-in-docker-compose

GML-1796 dependency cycle detecte
…ementation + UI styling updates (#229)

* [GML-1779-show-response-as-table-or-graph] graph interface added - mock data

* GML-1797 - Investigate ECC

Updated ECC to let workers work take a processing node after the expire window.  Added more logging and options during configuration

* Lots of cleanup of the ECC

* [GML-1779-show-response-as-table-or-graph] updates to graph and table, styling updates

* [GML-1779-show-response-as-table-or-graph] table vis advancements

* [GML-1779-show-response-as-table-or-graph] re-do updates

---------

Co-authored-by: Ahmed Albadri <[email protected]>
Co-authored-by: RobRossmiller-TG <[email protected]>
* condition tweak for table vis

* cleanup, styling tweaks
* condition tweak for table vis

* cleanup, styling tweaks

* caret typewriter animation edit
@luzhoutg luzhoutg added the openai_gpt4o run tests on OpenAI GPT 4o label Jul 15, 2024
@@ -19,6 +19,10 @@ def __init__(self, config):
from langchain.chat_models import ChatOpenAI

model_name = config["llm_model"]
if graphname == "Transaction_Fraud":
Copy link
Collaborator

Choose a reason for hiding this comment

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

This shouldn't be here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I remember correctly, @RobRossmiller-TG added it to ensure better performance for demo. since gpt-4 works better on transaction fraud and inquiryAI.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah I don't think that we should ship that though. For the demo it worked well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sounds good. got it removed now

Copy link
Contributor

Choose a reason for hiding this comment

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

It was removed in the dev branch unless I missed it. Is this based on the latest dev?

Copy link
Contributor Author

@luzhoutg luzhoutg Jul 18, 2024

Choose a reason for hiding this comment

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

Yes. I also rebase it. It should be based on the latest dev branch now.

@@ -156,7 +165,7 @@ def question_for_agent(
def make_agent(graphname, conn, use_cypher, ws: WebSocket = None, supportai_retriever="hnsw_overlap") -> TigerGraphAgent:
if llm_config["completion_service"]["llm_service"].lower() == "openai":
llm_service_name = "openai"
llm_provider = OpenAI(llm_config["completion_service"])
llm_provider = OpenAI(llm_config["completion_service"], graphname=graphname)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove the graphname info here too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed it now.

@luzhoutg luzhoutg changed the title Gml 1824 regression test with out cypher support only Gml 1824 regression test without hallucination and usefulness check and cypher support Jul 17, 2024
Copy link
Collaborator

@parkererickson-tg parkererickson-tg left a comment

Choose a reason for hiding this comment

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

We want to optionally enable cypher generation

Copy link
Collaborator

@parkererickson-tg parkererickson-tg left a comment

Choose a reason for hiding this comment

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

We shouldn't completely remove cypher

@luzhoutg luzhoutg changed the title Gml 1824 regression test without hallucination and usefulness check and cypher support Gml 1824 regression test with cypher support and no hallucination and usefulness check Jul 17, 2024
@luzhoutg
Copy link
Contributor Author

We shouldn't completely remove cypher

Sure. I have added cypher support back as optional now.

@@ -90,7 +91,7 @@ def __init__(
self.embedding_store,
self.mq2s,
self.gen_func,
cypher_gen_tool=self.cypher_tool,
# cypher_gen_tool=self.cypher_tool,
Copy link
Contributor

Choose a reason for hiding this comment

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

Just double check, is cypher support still available and optional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch. just added it back. should be good to go.

@luzhoutg luzhoutg requested a review from billshitg July 18, 2024 17:11
@luzhoutg luzhoutg merged commit d8170f8 into dev Jul 18, 2024
1 check passed
for key, value in output.items():
logger.info(f"testing steps {key}: {value}")
Copy link
Contributor

Choose a reason for hiding this comment

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

Missed this line. Do we need to log all the questions and generated answer?

Copy link
Contributor Author

@luzhoutg luzhoutg Jul 19, 2024

Choose a reason for hiding this comment

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

We can comment it out. It was trying to understand which step went wrong during testing. I will remove it in next PR.

@luzhoutg luzhoutg deleted the GML-1824-regression-test-with-out-cypher-support-only branch August 2, 2024 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openai_gpt4o run tests on OpenAI GPT 4o
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants