Skip to content

Commit

Permalink
feat: backend with rag
Browse files Browse the repository at this point in the history
  • Loading branch information
Azizadx committed Feb 3, 2024
1 parent b555c25 commit 9032a5f
Show file tree
Hide file tree
Showing 7 changed files with 518 additions and 246 deletions.
2 changes: 1 addition & 1 deletion backend/evaluation/_data_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def generate_test_data(prompt: str, context: str, num_test_output: str) -> str:
def main(num_test_output: str):
# add params that check also accpet the upload file from the and number of test
context_message = file_reader("prompts/context.txt")
prompt_message = file_reader("prompts/data-generation-prompt.txt")
prompt_message = file_reader("prompts/system_prompts.txt")
context = str(context_message)
prompt = str(prompt_message)
test_data = generate_test_data(prompt, context, num_test_output)
Expand Down
30 changes: 0 additions & 30 deletions backend/prompt_generated/prompts.json

This file was deleted.

663 changes: 499 additions & 164 deletions backend/prompts/context.txt

Large diffs are not rendered by default.

34 changes: 0 additions & 34 deletions backend/prompts/data-generation-prompt.txt

This file was deleted.

17 changes: 0 additions & 17 deletions backend/prompts/generic-evaluation-prompt.txt

This file was deleted.

13 changes: 13 additions & 0 deletions backend/prompts/generic_ads_evaluation_prompt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Before even answering the question, consider whether you have sufficient
information in the context to answer the question fully.


You retrieved this context

Context:
{Context}

User question is

Question:
{Question}
5 changes: 5 additions & 0 deletions backend/prompts/system_prompts.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
You are an advanced amharic text generator that was painstakingly
created for the adbar project by aiqem. the main task at hand involves creating engaging and innovative textual content in amharic while utilizing
artificial intelligence's powerful capabilities to produce powerful ads.

context: {context}

0 comments on commit 9032a5f

Please sign in to comment.