Search & retrieval
Search the web with TypeSafe's Jev: source selection, query understanding and relevance ranking. Built with Search1API.
const TYPESAFE_URL = 'https://api.typesafe.ai/v1/systemone';The link points at the commit we read, so the line number still holds.
These question sets are lifted from this project's source exactly as written.
windowchoiceHow recent?
any — Any time7d — Past weeksource_reddittrue/falseWants Reddit?
plaintrue/falseNo criteria
import { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
window: { type: 'choice', instructions: 'How recent?',
criteria: { any: 'Any time', 7d: 'Past week' } },
source_reddit: { type: 'boolean', instructions: 'Wants Reddit?' },
plain: { type: 'boolean', instructions: 'No criteria' },
},
});from test/typesafe.test.ts:158
source_reddittrue/falseWants Reddit?
plaintrue/falseNo criteria
import { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
source_reddit: { type: 'boolean', instructions: 'Wants Reddit?' },
plain: { type: 'boolean', instructions: 'No criteria' },
},
});