Creates an assistant.
Check its status with Assistants.describe before using it.
Assistant name, such as support-guide, and optional instructions, metadata, and region.
Assistant details, including its status and host.
Errors.PineconeArgumentError if options are missing or the region is unsupported.
Deletes an assistant by name.
The name of the assistant to delete, such as support-guide.
Resolves when the deletion request completes.
Errors.PineconeArgumentError if assistantName is empty.
Gets assistant configuration and readiness status.
The name of the assistant, such as support-guide.
Assistant details, including its status and host.
Errors.PineconeArgumentError if assistantName is empty.
import { Pinecone } from '@pinecone-database/pinecone';
const pc = new Pinecone();
const assistant = await pc.assistants.describe('support-guide');
console.log(assistant.status);
Assistants.list to discover assistants.
Evaluates a generated answer against a ground truth answer.
The question, generated answer, and reference answer in groundTruth.
Correctness, completeness, and alignment metrics, with reasoning and usage.
Errors.PineconeArgumentError if options are missing or an answer or question is empty.
import { Pinecone } from '@pinecone-database/pinecone';
const pc = new Pinecone();
const result = await pc.assistants.evaluate({
question: 'Where can I start a return?',
answer: 'Start a return from your order history.',
groundTruth: 'Customers can start returns from their order history.',
});
console.log(result.metrics);
Lists assistants in the project.
Assistant details in assistants.
import { Pinecone } from '@pinecone-database/pinecone';
const pc = new Pinecone();
const result = await pc.assistants.list();
console.log(result.assistants);
Assistants.describe for details of one assistant.
Updates assistant instructions or metadata.
Omitted fields are left unchanged; an empty instructions string is not applied.
The assistant name and the instructions or metadata to update.
The updated assistant name, instructions, and metadata.
Errors.PineconeArgumentError if options or the assistant name are missing.
Assistants manages assistants and evaluates generated answers.
Access it through
pc.assistants; do not construct it directly. Use Pinecone.assistant to chat with one assistant and manage its files.Example