Skip to content

Commit

Permalink
better prompting?
Browse files Browse the repository at this point in the history
  • Loading branch information
micsthepick committed Jul 3, 2024
1 parent 2f688a7 commit e0d973c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
9 changes: 4 additions & 5 deletions llamacppasync.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,14 @@
"Authorization": f"Bearer {AUTH}"
}
def get_data(question, hunk):
return f"""[INST]Determine whether the Bible text is applicable for answering the provided question:
return f"""[INST]Determine whether the Bible text is applicable for QUERY:[/INST]
[TEXT]
{hunk}
[END TEXT]
[/TEXT]
(Your Answer Must be 'yes' or 'no' without quotes)
[QUESTION]
[QUERY]
{question}
[END QUESTION]
[/INST]
[/QUERY]
Answer:"""

async def get_tok(session, tok):
Expand Down
6 changes: 3 additions & 3 deletions searchProverbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


# Configuration and Constants
BATCHSIZE = 64
BATCHSIZE = 32
testing_key = 'Password12344321'
AUTH = os.getenv("OPENAI_AI_KEY", testing_key)
testing_api = "http://127.0.0.1:8080"
Expand All @@ -31,11 +31,11 @@ def get_data(question, hunk):
return f"""[INST]Determine whether the Bible text is applicable for QUERY:[/INST]
[TEXT]
{hunk}
[END TEXT]
[/TEXT]
(Your Answer Must be 'yes' or 'no' without quotes)
[QUERY]
{question}
[END QUERY]
[/QUERY]
Answer:"""


Expand Down
7 changes: 3 additions & 4 deletions searchPsalms.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,14 @@
"Authorization": f"Bearer {AUTH}"
}
def get_data(question, hunk):
return f"""[INST]Determine whether the Bible text is applicable for QUERY:
return f"""[INST]Determine whether the Bible text is applicable for QUERY:[/INST]
[TEXT]
{hunk}
[END TEXT]
[/TEXT]
(Your Answer Must be 'yes' or 'no' without quotes)
[QUERY]
{question}
[END QUERY]
[/INST]
[/QUERY]
Answer:"""


Expand Down

0 comments on commit e0d973c

Please sign in to comment.