Overview of text prompt design,示例:
Text:
Question:
Answer:
Categories:
Options:
示例2(关联一致性):
Classify the sentiment of the following text as positive or negative.
Text: I love chocolate.
Sentiment:
Provide a summary for the following article:
...
Write an abstract of this article:
...
Write a creative title for the text.
...
Summarize the following conversation.
A: ...
B: ...
The following are common use cases for extraction:
- Named entity recognition (NER): Extract named entities from text, including people, places, organizations, and dates.
- Relation extraction: Extract the relationships between entities in text, such as family relationships between people.
- Event extraction: Extract events from text, such as project milestones and product launches.
- Question answering: Extract information from text to answer a question.
text-bison
Prompt:
Extract the technical specifications from the text below in a JSON format. Valid fields are name, network, ram, processor, storage, and color.
Text: Google Pixel 7, 5G network, 8GB RAM, Tensor G2 processor, 128GB of storage, Lemongrass
JSON:
Response:
{
"name": "Google Pixel 7",
"network": "5G",
"ram": "8GB",
"processor": "Tensor G2",
"storage": "128GB",
"color": "Lemongrass"
}
- Quickstart using the Vertex AI API 文中给了提示词示例和参数示例,重点参考
- 从文本实体提取模型获取预测结果 支持批量预测
- Google Vertex AI Client for Java