README / prompts.py
Abdulrahman Almutlaq
something
044b38d
raw
history blame
7.64 kB
from langchain.prompts import ChatPromptTemplate
SYS_STRUCT = '''You are a software requirements engineer with years of experience working at a big tech company.
Your aim is to craft a well-written and clear software requirements documentation for the provided systems and use cases.
'''
# and respond only in Arabic
HUMAN_STRUCT = '''Can you generate the following component for a {system_name}.
- System actors
# FORAMT INSTRUCTIONS
{format_instructions}'''
# - System epics for each Actor
# - System feature for each epic
system_structure_template = ChatPromptTemplate.from_messages([
("system", SYS_STRUCT),
("human", HUMAN_STRUCT),
])
SYS_EPICS = '''You are a software requirements engineer with years of experience working at a big tech company.
Your aim is to craft a well-written and clear software requirements documentation for the provided systems and use cases.
'''
HUMAN_EPICS = '''Generate the system epics and features for the following actor make sure you create the core needed actors only.
System Name: {system_name}
System Actor: {system_actor}
Actor Description: {actor_description}
# FORAMT INSTRUCTIONS
{format_instructions}
'''
system_epics_template = ChatPromptTemplate.from_messages([
("system", SYS_EPICS),
("human", HUMAN_EPICS),
])
SYS_CARDS = '''You are a software requirements engineer with years of experience working at a big tech company.
Your aim in this exciting project is to craft a well-written and clear software requirements document. You must be very detailed and thorough.
'''
HUMAN_CARDS = '''Generate a detailed user story card for the following context. You must pay a close attention to the data available in the Schema section.
# General Instructions:
- If you used an email notification make sure you mention the email in the message.
# Schema:
{schema}
# System Epic:
{system_epic}
# Epic Feature:
{epic_feature}
# FORAMT INSTRUCTIONS
{format_instructions}
Take a deep breath and begin!
'''
story_cards_template = ChatPromptTemplate.from_messages([
("system", SYS_CARDS),
("human", HUMAN_CARDS),
])
# =======================================================================================================================================
# Generateing Entities prompt
# =======================================================================================================================================
SYS_ENTITIES = '''Please provide up to four crucial actors and entities for the given system's high-level data models. Exclude any configuration-related entities.
'''
HUMAN_ENTITIES = '''Generate the high-level data models (4 maximum) of the given system (i.e., actors and entities).
Make sure you only mention the most important ones.
Avoid mentioning the config related entities.
Be very concise you have to sort it from the most important one to the least important.
# System Context:
{system_context}
# FORAMT INSTRUCTIONS
{format_instructions}
'''
entities_template = ChatPromptTemplate.from_messages([
("system", SYS_ENTITIES),
("human", HUMAN_ENTITIES),
])
# =======================================================================================================================================
# End of Entities prompt
# =======================================================================================================================================
SYS_CARDS = '''You are a software requirements engineer with years of experience working at a big tech company.
Your aim in this exciting project is to craft a well-written and clear software requirements document. You must be very detailed and thorough.
'''
HUMAN_CARDS = '''Generate a detailed data model card given the provided entity and context. Use spaces instead of dashes on the attribute name.
Please rely on the system context (provided in a json format) to derive the data and attributes.
You will also return the result in a JSON format explained below.
# Examples of properties:
Example properties for a system actor:
First Name, Last Name, Date of Birth, [.. continue as you see fit from the context]
Example properties for a physical entity (i.e., room) properties:
Width, Location, [.. continue as you see fit from the context]
# System Information
- System Entity: {system_entity}
- System Context in a JSON format:
{system_context}
# FORAMT INSTRUCTIONS
{format_instructions}
'''
schema_template = ChatPromptTemplate.from_messages([
("system", SYS_CARDS),
("human", HUMAN_CARDS),
])
SYS_CARDS = '''You are a software requirements engineer with years of experience working at a big tech company.
Your aim in this exciting project is to craft a well-written and clear software requirements document. You must be very detailed and thorough.
'''
HUMAN_CARDS = '''The user has new feature request. Given the old data schema shown below, edit it and print out the updated data schema (which may contain either modified fields or entirly new fields). Be conservative.
Please rely on the system context (provided in a json format).
You will also return the result in a JSON format explained below.
You must follow the format instructions very closely.
# Schema:
{schema}
# System Context:
{system_context}
# New Use Case:
{new_usecase}
# FORAMT INSTRUCTIONS
{format_instructions}
Be very conservative and only edit existing schema if necessary.
Only return the entity object containing the modifications or updates, not the entire schema.
'''
update_schema_template = ChatPromptTemplate.from_messages([
("system", SYS_CARDS),
("human", HUMAN_CARDS),
])
SYS_CARDS = '''You are a software requirements engineer with years of experience working at a big tech company.
Your aim in this exciting project is to craft a well-written and clear software requirements document. You must be very detailed and thorough.
'''
HUMAN_CARDS = '''Generate an updated user story card provided the new schema shown below. You must pay a close attention to the data available in the Schema section.
Be very concise to show all the editable or viewable data available in the data Schema in the data section within the user story card.
# Story Card:
{story_card}
# Updated Schema:
{schema}
# FORAMT INSTRUCTIONS
{format_instructions}
Take a deep breath and begin!
'''
update_story_cards_template = ChatPromptTemplate.from_messages([
("system", SYS_CARDS),
("human", HUMAN_CARDS),
])
# Build a data schema for the given system context shown previously, with the following sections
# Each object will hold the following information
# Object Name
# Object Unique ID numbers only
# Each Object will hold as many Attribute as needed with the following information
# Attribute Unique ID (Start with Object Unique ID then dashed Attribute ID)
# Attribute name only in Arabic.
# Attribute Data type with the following option (Number or text or date or number and text ) only in Arabic.
# Make sure you build an Object for each actor mentioned previously
# You can use spaces instead of dashes on the attribute name
# Show the data on the markdown table
# Don’t mention the key type
SYS_STRUCT = '''Please answer with yes or no.
Is the following message a possible {var}, if it is answer with yes please.
Yet if it is a part of a chat like 'hello', 'thank you' or other non-possible system name please respond with no.
'''
# and respond only in Arabic
HUMAN_STRUCT = '''{message}'''
# - System epics for each Actor
# - System feature for each epic
check_message_template = ChatPromptTemplate.from_messages([
("system", SYS_STRUCT),
("human", HUMAN_STRUCT),
])