Arize Phoenix TS
    Preparing search index...

    Declare a single Phoenix eval test case.

    Drop-in replacement for the test runner's own test / it. The params argument carries the input and the reference output (expected / reference / output) that become the dataset example; whatever the handler returns (or passes to logOutput()) is recorded as the experiment run's output and made available to evaluators.

    it is the canonical alias for test; the two are identical.

    px.test(
    "summarizes the article",
    { input: { article }, expected: { summary } },
    async ({ input, expected }) => {
    const output = await summarize(input.article);
    px.logOutput(output);
    await px.evaluate({ name: "matches", evaluate: () => output === expected.summary });
    }
    );
    interface PhoenixTest {
        each<Input extends KVMap, Expected extends KVMap>(
            table: TestEachRow<Input, Expected>[],
        ): PhoenixTestEach<Input, Expected>;
        only<Input extends KVMap = KVMap, Expected extends KVMap = KVMap>(
            name: string,
            params: TestParams<Input, Expected>,
            fn: TestFn<Input, Expected>,
            timeout?: number,
        ): void;
        skip<Input extends KVMap = KVMap, Expected extends KVMap = KVMap>(
            name: string,
            params: TestParams<Input, Expected>,
            fn: TestFn<Input, Expected>,
            timeout?: number,
        ): void;
        <Input extends KVMap = KVMap, Expected extends KVMap = KVMap>(
            name: string,
            params: TestParams<Input, Expected>,
            fn: TestFn<Input, Expected>,
            timeout?: number,
        ): void;
    }
    Index

    Methods

    Methods