Skip to content

Commit b71b077

Browse files
authored
Merge pull request #52 from FalkorDB/llm-tests
Update pytests
2 parents 70a2985 + e1a19d9 commit b71b077

File tree

13 files changed

+1985
-536
lines changed

13 files changed

+1985
-536
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ jobs:
2424
- 11434:11434
2525
volumes:
2626
- ollama:/root/.ollama
27+
28+
strategy:
29+
matrix:
30+
model: [gemini/gemini-2.0-flash, openai/gpt-4o] # List of models
2731

2832
steps:
2933
- uses: actions/checkout@v4
@@ -73,4 +77,6 @@ jobs:
7377
REGION: ${{ vars.REGION }}
7478
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
7579
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
80+
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
81+
TEST_MODEL: ${{ matrix.model }} # Pass the model as an environment variable
7682
run: poetry run pytest

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ output
77

88
logs
99
falkordb-data
10-
weaviate-data
10+
weaviate-data
11+
.deepeval_telemtry.txt

graphrag_sdk/fixtures/prompts.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -433,12 +433,9 @@
433433
434434
435435
For example, given the question "Which managers own Neo4j stocks?", the OpenCypher statement should look like this:
436-
```
437436
MATCH (m:Manager)-[:OWNS]->(s:Stock)
438437
WHERE s.name CONTAINS 'Neo4j'
439-
RETURN m, s
440-
```
441-
"""
438+
RETURN m, s"""
442439

443440
CYPHER_GEN_PROMPT = """
444441
Using the ontology provided, generate an OpenCypher statement to query the graph database returning all relevant entities, relationships, and attributes to answer the question below.
@@ -447,7 +444,7 @@
447444
Please think if your answer is a valid Cypher query, and correct it if it is not.
448445
449446
Question: {question}
450-
"""
447+
Your generated Cypher: """
451448

452449

453450
CYPHER_GEN_PROMPT_WITH_ERROR = """
@@ -472,9 +469,8 @@
472469
Respect the order of the relationships; the arrows should always point from the "source" to the "target".
473470
474471
Last Answer: {last_answer}
475-
476472
Question: {question}
477-
"""
473+
Your generated Cypher: """
478474

479475
GRAPH_QA_SYSTEM = """
480476
You are an assistant that helps to form nice and human understandable answers.

0 commit comments

Comments
 (0)