搜索与检索
JEV Document Classification 利用 TypeSafe 的 System One 模型,快速且低成本地对文本文件进行分类。
JEV Document Classification enables the rapid and cost-effective classification of text-based documents using AI, leveraging TypeSafe's "System One" model.
import { createGateway, experimental_evaluate as evaluate } from 'ai';链接指向我们抓取当天的那个 commit,行号是准的。
下面是从这个项目源码里原样取出来的 question 组合。
取自 server/classification.ts:113
confidentiality选项Assess the sensitivity of the document content. Choose the highest applicable confidentiality level.
Public — Safe to share publicly; contains no sensitive business or personal information.Internal — For internal use; contains routine business information that should not be public.Confidential — Contains sensitive business, financial, contractual, or personal information.Restricted — Contains highly sensitive personal data, credentials, health data, legal privilege, or critical business secrets.import { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
confidentiality: { type: 'choice', instructions: 'Assess the sensitivity of the document content. Choose the highest applicable confidentiality level.',
criteria: { Public: 'Safe to share publicly; contains no sensitive business or personal information.', Internal: 'For internal use; contains routine business information that should not be public.', Confidential: 'Contains sensitive business, financial, contractual, or personal information.', Restricted: 'Contains highly sensitive personal data, credentials, health data, legal privilege, or critical business secrets.' } },
},
});