-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add demo split-text-paragraphs by autoPrompt
- Loading branch information
Showing
3 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
system: >- | ||
<Inputs> | ||
{$TEXT} | ||
</Inputs> | ||
<Instructions Structure> | ||
1. Introduce the task and the input variable. | ||
2. Explain the criteria for splitting the text into paragraphs. | ||
3. Provide a step-by-step guide on how to split the text. | ||
4. Instruct the AI to format the output. | ||
</Instructions Structure> | ||
<Instructions> | ||
You are tasked with splitting a given text into paragraphs. The text will be | ||
provided in the variable <text>{$TEXT}</text>. | ||
Here are the criteria for splitting the text into paragraphs: | ||
- A paragraph should start with a new line. | ||
- Each paragraph should contain a coherent set of sentences that discuss a | ||
single topic or idea. | ||
- Paragraphs should be separated by one blank line. | ||
- Avoid splitting sentences that are part of the same idea or topic into | ||
different paragraphs. | ||
Follow these steps to split the text into paragraphs: | ||
1. Read the entire text to understand its structure and content. | ||
2. Identify the main topics or ideas in the text. | ||
3. For each main topic or idea, create a new paragraph. | ||
4. Ensure that each paragraph starts with a new line and is separated from | ||
the previous paragraph by one blank line. | ||
5. Review the paragraphs to ensure they are coherent and each contains a | ||
single topic or idea. | ||
Format your output as follows: | ||
- Write each paragraph on a new line. | ||
- Separate paragraphs with one blank line. | ||
Here is an example of the expected output format: | ||
<example> | ||
<paragraph> | ||
This is the first paragraph. It contains a coherent set of sentences that | ||
discuss a single topic or idea. | ||
</paragraph> | ||
<paragraph> | ||
This is the second paragraph. It also contains a coherent set of sentences | ||
that discuss a different topic or idea. | ||
</paragraph> | ||
</example> | ||
Please follow these instructions carefully to ensure the text is split into | ||
paragraphs correctly. | ||
</Instructions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
system: >- | ||
You have a long text document that needs to be split into | ||
logical paragraphs for better readability and comprehension. | ||
**Task**: Split the text into paragraphs based on logical breaks that | ||
enhance the flow and coherence of the document. | ||
**Steps**: | ||
1. **Identify Logical Breaks**: Look for natural pauses or transitions in | ||
the text where one idea ends and another begins. | ||
2. **Summarize Key Trends**: Summarize the key trends or ideas in each | ||
potential paragraph to ensure they are coherent and distinct. | ||
3. **EXPLAIN the Reasoning Behind Each Break**: Provide a detailed | ||
explanation for why each identified break is logical, using comparative | ||
examples to clarify complex concepts and highlight nuances in | ||
interpretation. | ||
4. **Deduce the Best Paragraph Breaks**: Given the context and content of | ||
the text, deduce the most effective paragraph breaks that enhance the | ||
overall readability and comprehension. | ||
5. **Induce General Rules**: From the examples you analyze, induce general | ||
rules for identifying logical paragraph breaks in similar texts. | ||
**Output**: Provide a well-structured document with logical paragraph | ||
breaks, along with a detailed explanation for each break and the general | ||
rules you have induced. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
system: |- | ||
Consider the text you've provided as a continuous flow of ideas. Your task is to meticulously dissect this flow, identifying the natural breaks and grouping related thoughts into distinct paragraphs. | ||
Think of each paragraph as a mini-argument or a self-contained unit of meaning. | ||
* **Analyze the text:** Look for shifts in topic, changes in tone, or the use of punctuation (like periods or em dashes) that might signal a paragraph break. | ||
* **Deduce the structure:** Based on your analysis, determine the logical grouping of sentences that create coherent paragraphs. | ||
Provide me with the text, clearly segmented into paragraphs, and explain your reasoning for each break. | ||