Enum TaskType
- Namespace
- GenerativeAI.Types
- Assembly
- GenerativeAI.dll
Specifies the type of task for which the embedding will be used.
[JsonConverter(typeof(JsonStringEnumConverter<TaskType>))]
public enum TaskType
- Extension Methods
Fields
TASK_TYPE_UNSPECIFIED = 0Unset value, which will default to one of the other enum values.
RETRIEVAL_QUERY = 1Embeddings optimized for general search queries. Use RETRIEVAL_QUERY for queries; RETRIEVAL_DOCUMENT for documents to be retrieved. Use case: Custom search
RETRIEVAL_DOCUMENT = 2Embeddings optimized for document search. Indexing articles, books, or web pages for search.
SEMANTIC_SIMILARITY = 3Embeddings optimized to assess text similarity. Use case: Recommendation systems, duplicate detection
CLASSIFICATION = 4Embeddings optimized to classify texts according to preset labels. Use case: Sentiment analysis, spam detection
CLUSTERING = 5Embeddings optimized to cluster texts based on their similarities. Use case: Document organization, market research, anomaly detection
CODE_RETRIEVAL_QUERY = 6Embeddings optimized for retrieval of code blocks based on natural language queries. Use CODE_RETRIEVAL_QUERY for queries; RETRIEVAL_DOCUMENT for code blocks to be retrieved. Use case: Code suggestions and search
QUESTION_ANSWERING = 7Embeddings for questions in a question-answering system, optimized for finding documents that answer the question. Use QUESTION_ANSWERING for questions; RETRIEVAL_DOCUMENT for documents to be retrieved. Use case: Chatbox
FACT_VERIFICATION = 8Embeddings for statements that need to be verified, optimized for retrieving documents that contain evidence supporting or refuting the statement. Use FACT_VERIFICATION for the target text; RETRIEVAL_DOCUMENT for documents to be retrieved. Use case: Automated fact-checking systems