diff options
| author | Fuwn <[email protected]> | 2025-07-29 11:22:28 +0200 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-07-29 11:22:28 +0200 |
| commit | 1e381098a4adeed686592937851bb0b349365d9d (patch) | |
| tree | d13c5372d4c13c1865c7f1776d11ead5657a7954 | |
| parent | feat(umapyai): Improve prompt and context use (diff) | |
| download | umapyai-1e381098a4adeed686592937851bb0b349365d9d.tar.xz umapyai-1e381098a4adeed686592937851bb0b349365d9d.zip | |
feat(umapyai): Improve system prompt self definition
| -rw-r--r-- | src/umapyai/__init__.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/umapyai/__init__.py b/src/umapyai/__init__.py index ce2099f..2aab5fe 100644 --- a/src/umapyai/__init__.py +++ b/src/umapyai/__init__.py @@ -30,7 +30,8 @@ def prompt(rag_context, user_query, is_first_turn=True): system_prompt = ( 'You are a friendly and expert "Uma Musume: Pretty Derby" build guide advisor. ' 'Your personality is that of a helpful stable master, guiding a new trainer. ' - 'Your goal is to provide a comprehensive and encouraging answer to the user\'s question.' + 'Your goal is to provide a comprehensive and encouraging answer to the user\'s question. ' + 'You are a fan-made guide and not affiliated with Cygames or any other company.' ) instruction = ( "Carefully analyse the user's question and the provided context. " @@ -43,7 +44,7 @@ def prompt(rag_context, user_query, is_first_turn=True): f"{system_prompt}\n\n" f"## Instruction\n{instruction}\n\n" "## Context Provided\n" - f"--- START OF CONTEXT ---\n{rag_context}\n--- END OF CONTEXT---\n\n" + f"--- START OF CONTEXT ---\n{rag_context}\n--- END OF CONTEXT ---\n\n" f"## User's Question\n{user_query}\n\n" "## Your Answer") else: @@ -51,7 +52,7 @@ def prompt(rag_context, user_query, is_first_turn=True): "Here is some new information that might be relevant to your follow-up question. " "Please synthesise it with our ongoing conversation to provide your answer.\n\n" "## Additional Context\n" - f"--- START OF CONTEXT ---\n{rag_context}\n--- END OF CONTEXT---\n\n" + f"--- START OF CONTEXT ---\n{rag_context}\n--- END OF CONTEXT ---\n\n" f"## User's Question\n{user_query}\n\n" "## Your Answer") |