通常システム開発

langchainチャットボット作成プロンプト

https://chat.openai.com/share/2ffd5bea-919d-4f08-8e49-6f75b6f4375b

 

 

検証中

チェーンプロンプト。

長すぎて英語になりました。

Pythonのpの字も知らない人です。

プロンプト本文

Yes, there are dependencies among the prompts. The output of one prompt often serves as the input for another. Here's how these dependencies can be expressed mathematically:

1. **Environment Setup** must occur before **API Key Procurement** because you need a secure environment to store the API key.

If we let \( f_{\text{env}} \) represent the Environment Setup function and \( f_{\text{api}} \) represent the API Key Procurement function, then:

\[ f_{\text{api}}(f_{\text{env}}(\text{{PYTHON_VERSION}})) \rightarrow \text{{ApiKeyStorageDocumentation}} \]

2. **Defining Chatbot Purpose** can be independent but is often a precursor to **Designing User Interaction** because the purpose will guide the design.

If \( f_{\text{purpose}} \) is the Define Chatbot Purpose function and \( f_{\text{ui}} \) is the Design User Interaction function, then:

\[ f_{\text{ui}}(f_{\text{purpose}}(\text{{CHATBOT_PURPOSE}})) \rightarrow \text{{UI_DesignPrototypes_and_FrameworkRationale}} \]

3. **Preparing Deployment Credentials** often depends on the **Environment Setup** because deployment typically requires specific environment configurations.

If \( f_{\text{deploy}} \) is the Prepare Deployment Credentials function, then:

\[ f_{\text{deploy}}(f_{\text{env}}(\text{{PYTHON_VERSION}})) \rightarrow \text{{DeploymentGuideWithCredentials}} \]

These dependencies indicate that the output of the environment setup is a prerequisite for both the API key procurement and the deployment credentials preparation. Similarly, the output of defining the chatbot's purpose is a prerequisite for designing user interaction.

For each prompt, we can define the relationship between INPUT, Prompt(Input), and OUTPUT as a functional mapping, where the Prompt acts as a function that takes INPUT and produces OUTPUT. Here's how this relationship can be expressed mathematically for each prompt:

---

**Environment Setup Prompt**

- INPUT: `{PYTHON_VERSION}`
- Prompt(Input): `EnvironmentSetup({PYTHON_VERSION})`
- OUTPUT: `EnvironmentSetupReport`

Mathematically, this can be expressed as:

\[ f_{\text{env}}(\text{{PYTHON_VERSION}}) \rightarrow \text{{EnvironmentSetupReport}} \]

---

**API Key Procurement Prompt**

- INPUT: `{API_KEY}`
- Prompt(Input): `ApiKeyProcurement({API_KEY})`
- OUTPUT: `ApiKeyStorageDocumentation`

Mathematically, this can be expressed as:

\[ f_{\text{api}}(\text{{API_KEY}}) \rightarrow \text{{ApiKeyStorageDocumentation}} \]

---

**Defining Chatbot Purpose Prompt**

- INPUT: `{CHATBOT_PURPOSE}`
- Prompt(Input): `DefineChatbotPurpose({CHATBOT_PURPOSE})`
- OUTPUT: `ChatbotPurposeScopeDocument`

Mathematically, this can be expressed as:

\[ f_{\text{purpose}}(\text{{CHATBOT_PURPOSE}}) \rightarrow \text{{ChatbotPurposeScopeDocument}} \]

---

**Designing User Interaction Prompt**

- INPUT: `{USER_INTERACTION_PLATFORM}`
- Prompt(Input): `DesignUserInteraction({USER_INTERACTION_PLATFORM})`
- OUTPUT: `UI_DesignPrototypes_and_FrameworkRationale`

Mathematically, this can be expressed as:

\[ f_{\text{ui}}(\text{{USER_INTERACTION_PLATFORM}}) \rightarrow \text{{UI_DesignPrototypes_and_FrameworkRationale}} \]

---

**Preparing Deployment Credentials Prompt**

- INPUT: `{DEPLOYMENT_CREDENTIALS}`
- Prompt(Input): `PrepareDeploymentCredentials({DEPLOYMENT_CREDENTIALS})`
- OUTPUT: `DeploymentGuideWithCredentials`

Mathematically, this can be expressed as:

\[ f_{\text{deploy}}(\text{{DEPLOYMENT_CREDENTIALS}}) \rightarrow \text{{DeploymentGuideWithCredentials}} \]

---

In each case, the function \( f \) represents the Prompt process that transforms the INPUT into the OUTPUT. The specific nature of \( f \) is determined by the detailed steps within each prompt.

To further refine the structure, each main task will be broken down into independent prompts that can be executed sequentially by the Task Execution Agent. Here's how they can be restructured:

---

# Prompt for Environment Setup

## Purpose
Set up the Python environment for chatbot development.

## Variables
- `{PYTHON_VERSION}`: Desired Python version.

## Steps
1. Install the specified Python version using `pyenv`.
2. Set the installed version as global default.

## Execution
- Run `pyenv install {PYTHON_VERSION}`
- Run `pyenv global {PYTHON_VERSION}`

## Verification
- Execute `python --version` to confirm the correct version is in use.

## Deliverable
- A report confirming the Python version and environment setup.

---

# Prompt for API Key Procurement

## Purpose
Securely obtain and store the API key for the language model.

## Variables
- `{API_KEY}`: The API key for the language model.

## Steps
1. Navigate to the language model provider's portal.
2. Secure the API key using a vault system.

## Execution
- Store the API key in the vault with `vault write secret/api_key value={API_KEY}`

## Verification
- Retrieve the API key with `vault read secret/api_key` to confirm storage.

## Deliverable
- Documentation on how the API key was obtained and stored.

---

# Prompt for Defining Chatbot Purpose

## Purpose
Clarify and document the chatbot's intended purpose and domain.

## Variables
- `{CHATBOT_PURPOSE}`: Defined purpose of the chatbot.

## Steps
1. Conduct a requirements gathering session.
2. Document the chatbot's purpose in a project management tool.

## Execution
- Record the `{CHATBOT_PURPOSE}` in JIRA or a similar tool.

## Verification
- Review the documented purpose with stakeholders for confirmation.

## Deliverable
- A detailed scope document outlining the chatbot's purpose.

---

# Prompt for Designing User Interaction

## Purpose
Design the user interface and select the appropriate front-end framework.

## Variables
- `{USER_INTERACTION_PLATFORM}`: The platform for user interaction.

## Steps
1. Create UI/UX designs.
2. Choose a front-end framework.

## Execution
- Use design tools like Figma for mockups.
- Decide on a framework like React or Vue.js.

## Verification
- Present designs and framework choice for stakeholder approval.

## Deliverable
- UI design prototypes and a rationale for the chosen framework.

---

# Prompt for Preparing Deployment Credentials

## Purpose
Set up and verify deployment credentials.

## Variables
- `{DEPLOYMENT_CREDENTIALS}`: Credentials for deployment.

## Steps
1. Configure cloud resources with Terraform.
2. Set up credentials in the cloud platform.

## Execution
- Run `terraform apply` to initialize deployment infrastructure.
- Configure `{DEPLOYMENT_CREDENTIALS}` in AWS IAM or similar.

## Verification
- Check that the credentials work by deploying a test instance.

## Deliverable
- A deployment guide with credentials setup and verification steps.

---

Each prompt is now a standalone module, allowing for focused execution and clear deliverables, making the development process more manageable and structured.

'''
User:こんにちは、順番に始めましょう!
lang:ja
削除キー: