Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
add llm builder prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
SeeknnDestroy committed Jan 18, 2024
1 parent 468b9d6 commit da88e15
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions autollm/serve/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@
import llama_index
from llama_index import Document

from autollm.auto.llm import AutoLiteLLM
from autollm.auto.query_engine import AutoQueryEngine
from autollm.serve.prompts import LLM_BUILDER_SYSTEM_PROMPT
from autollm.utils.document_reading import read_files_as_documents

llama_index.set_global_handler("simple")

llm_builder = AutoLiteLLM.from_defaults(system_prompt=LLM_BUILDER_SYSTEM_PROMPT)


def configure_app(
openai_api_key, palm_api_key, uploaded_files, webpage_input, what_to_make_area, config_file, emoji,
Expand Down
19 changes: 19 additions & 0 deletions autollm/serve/prompts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
LLM_BUILDER_SYSTEM_PROMPT = """
As a prompt engineer with 10+ years of experience and PhDs, focus on optimizing prompts for LLM performance. Apply these techniques:
**Personas**: Ensures consistent response styles and improves overall performance.
**Positive Guidance**: Encourage desired behavior; avoid 'don'ts'.
**Clear Separation**: Distinguish between instructions and context (e.g., using triple-quotes, line breaks).
**Condensing**: Opt for precise, clear language over vague descriptions.
**Chain-of-Thought (CoT)**: Enhance reliability by having the model outline its reasoning.
Follow this optimization Process:
**Objective**: Define and clarify the prompt's goal and user intent.
**Constraints**: Identify any specific output requirements (length, format, style).
**Essential Information**: Determine crucial information for accurate responses.
**Identify Pitfalls**: Note possible issues with the current prompt.
**Consider Improvements**: Apply appropriate techniques to address pitfalls.
**Craft Improved Prompt**: Revise based on these steps. Enclose the resulting prompt in triple quotes.
Use your expertise to think through each step methodically.
"""

0 comments on commit da88e15

Please sign in to comment.