Skip to main content

Vector Stores - Your Own Documents as Knowledge Source

Vector Stores enable your agent to use your own documents as a knowledge source – PDFs, text files, FAQs and more.


What is a Vector Store?

A Vector Store is a knowledge database that:

  • Stores and makes documents searchable
  • Converts text into mathematical "vectors"
  • Enables semantic search (by meaning, not just keywords)
  • Is managed by OpenAI

Simply explained: Imagine you upload your product catalogs, FAQs or manuals. The agent can then "look up" information in these documents when needed.


Use Cases

📚 Product Documentation

Upload: Product manuals, specifications, catalogs
Agent can: Look up technical details, explain features

❓ FAQ Database

Upload: FAQ document with questions & answers
Agent can: Give consistent answers to common questions

📋 Guidelines & Policies

Upload: Return policy, shipping guidelines, terms
Agent can: Provide correct information about policies

🏢 Company Knowledge

Upload: Training materials, internal docs
Agent can: Access employee knowledge

Create Vector Store

Step 1: Open OpenAI Dashboard

  1. Go to platform.openai.com
  2. Sign in
  3. Navigate to StorageVector Stores
  4. Or directly: platform.openai.com/storage/vector_stores

Step 2: Create New Vector Store

  1. Click on "+ Create vector store"
  2. A dialog will open

Step 3: Assign Name

Name: Enter a descriptive name

Examples:
- "Product Catalog Winter Collection 2025"
- "Customer Service FAQ"
- "Technical Documentation"
- "Return and Shipping Policies"

Tip: Choose names that are easy to identify later.

Step 4: Upload Files

Supported File Formats:

  • PDF (.pdf) - Ideal for documents, catalogs
  • Text (.txt) - Simple text files
  • Markdown (.md) - Formatted texts
  • Word (.docx) - Microsoft Word documents
  • HTML (.html) - Website content

File Limits:

  • Max. file size: 512 MB per file
  • Max. count: 10,000 files per Vector Store
  • Max. total size: Depends on your OpenAI plan

Upload Process:

  1. Click "Upload files" or drag files via drag & drop
  2. Select one or more files
  3. Wait for upload to complete
  4. Status: "Uploading" → "Processing" → "Completed"
Multiple Files

You can upload multiple files simultaneously! Ideal if you have, for example, a complete product catalog with 50 PDFs.

Step 5: Wait for Processing

OpenAI processes the files automatically:

  1. Chunking: Document is divided into small sections
  2. Embedding: Each section is converted into a vector
  3. Indexing: Vectors are made searchable

Duration:

  • Small file (10 pages): ~30 seconds
  • Large file (500 pages): ~5-10 minutes
  • Many files: Correspondingly longer

Check status:

  • Completed ✅ - Done, ready to use
  • Processing ⏳ - Being processed, wait
  • Failed ❌ - Error occurred

Step 6: Copy Vector Store ID

After successful processing:

  1. Open the Vector Store
  2. Find the Vector Store ID
  3. Format: vs_abc123...
  4. Click "Copy ID"

In Shopware Backend:

  1. Go to 5E OAI Agent Manager
  2. Open your agent (or create a new one)
  3. Find the "Vector Store ID" field
  4. Paste the copied ID: vs_abc123...
  5. Save
Linked!

Your agent can now access the documents in the Vector Store!


Mention Vector Store in Instructions

Important: Tell your agent to use the documents!

Example: System Instructions

You have access to our product catalog via a Vector Store.

IMPORTANT:
- Use the information from the Vector Store for product details
- If asked about specific product features, search the Vector Store FIRST
- Never give information that is NOT in the Vector Store
- If something is not in the documents, say honestly: "I don't have this information"

EXAMPLE:
Customer: "Does jacket X have a hood?"
You: [Search in Vector Store for "jacket X" and "hood"]
You: "Yes, jacket X has a removable hood with fur trim"

Example: FAQ Agent

You have access to our FAQ database in the Vector Store.

PROCESS:
1. For every question: Search the Vector Store FIRST
2. Use the exact answer from the FAQ
3. If no matching FAQ found: Use other tools or refer to support

NEVER answer based on your general knowledge when it comes to shop-specific questions!

Best Practices for Documents

1. Structure & Formatting

Well structured:

# Product Name: Premium Winter Jacket

## Description
A high-quality winter jacket for extreme cold.

## Features
- Material: 100% Polyester
- Filling: 90% down, 10% feathers
- Water column: 10,000 mm
- Breathability: 8,000 g/m²/24h
- Hood: Yes, removable
- Pockets: 4 (2 outside, 2 inside)

## Sizes
S, M, L, XL, XXL

## Care
- Machine wash at 30°C
- Do not bleach
- Do not tumble dry

Poorly structured:

Premium Winter Jacket, polyester, down, waterproof, hood,
4 pockets, wash at 30 degrees, sizes S-XXL

2. Clear Headings

✅ Use headings (H1, H2, H3) ✅ Structure logically ✅ Use lists ✅ Clearly separate topics

3. Avoid Redundancy

Not: Same information in 10 documents ✅ Better: One central document per topic

4. Ensure Currency

  • Update documents regularly
  • Delete outdated information
  • Version documents (e.g., "FAQ_v2_2025.pdf")

5. Optimize File Size

For PDFs:

  • Compress images
  • Remove unnecessary pages
  • Use text PDFs (not scanned text!)

Optimal:

  • 1-50 pages per document
  • 1-5 MB per file
  • Text searchable

Use Multiple Vector Stores

Attention: Currently, an agent can have only ONE Vector Store.

Workaround for multiple knowledge sources:

  1. Everything in one Vector Store:

    • Upload all documents into ONE Vector Store
    • Use clear filenames for organization
  2. Multiple Agents:

    • Agent A: Vector Store "Products"
    • Agent B: Vector Store "Support"
    • Agent C: Vector Store "Policies"

Manage Vector Store

Add Files

  1. Open the Vector Store in OpenAI
  2. Click "Add files"
  3. Upload new files
  4. Wait for processing

Delete Files

  1. Open the Vector Store
  2. Select the file
  3. Click "Delete"
  4. Confirm
Caution!

Deleted files cannot be recovered!

Delete Vector Store

  1. Go to Vector Stores overview
  2. Select the Vector Store
  3. Click "Delete vector store"
  4. Confirm

Important: Remove the ID from your agent in Shopware first!


Costs

Vector Store Costs

OpenAI charges for Vector Stores:

Storage: ~$0.10 per GB per day

Example calculation:

10 PDF files at 5 MB = 50 MB = 0.05 GB
Cost per day: 0.05 GB × $0.10 = $0.005 (half a cent)
Cost per month: $0.005 × 30 = $0.15

Conclusion: Vector Stores are very affordable!

Usage Costs

When the agent searches in the Vector Store, additional costs arise:

  • Embedding costs: ~$0.00002 per search
  • Token costs: Found texts count as input tokens

But: Good answers often save more than the search costs!


Troubleshooting

Problem: "Vector store not found"

Solution:

  1. Check the ID (format: vs_abc123...)
  2. Check if the Vector Store still exists in OpenAI
  3. Copy the ID again

Problem: Files are not being processed

Causes:

  • File format not supported
  • File is corrupted
  • File too large (> 512 MB)
  • PDF is protected/encrypted

Solution:

  • Convert to supported format
  • Repair the file
  • Split large files
  • Remove password protection

Problem: Agent doesn't find information

Solutions:

  1. Search is too specific:

    • Vector Store searches semantically, not keyword-based
    • Formulate questions more broadly
  2. Information not present:

    • Check if the info really is in the document
    • Use Ctrl+F in the original document
  3. Document poorly structured:

    • Improve the structure
    • Use headings
    • Upload again
  4. Mention in instructions:

    Use the Vector Store for product information.
    ALWAYS search the Vector Store first before answering.

Advanced Techniques

Chunk Strategy

Vector Stores divide documents into "chunks" (sections).

Optimal chunk size:

  • One chunk = 1 logical section
  • Use headings for separation
  • Avoid overly long paragraphs (> 500 words)

Example: Well structured

## Product Name

Description (100-200 words)

## Features

- Feature 1
- Feature 2

## Specifications

| Property | Value |
|----------|-------|
| Material | Polyester |

Use Metadata

In filenames, you can encode metadata:

Product_Winter_Jacket_Premium_Category_Outdoor.pdf
FAQ_Shipping_USA_2025.pdf
Policy_Returns_EU.pdf

This helps with organizing large Vector Stores.


Alternatives to Vector Stores

If Vector Stores don't fit your use case:

1. get_meta_information Tool

For: Short shop info (contact, hours)
Advantage: Faster, simpler
Disadvantage: Limited to plugin config field

2. fetch_url Tool

For: Dynamic content from your website
Advantage: Always current
Disadvantage: Slower responses, external dependency

3. search_logs Tool

For: Self-learning FAQ database
Advantage: Grows automatically
Disadvantage: Needs time to build up

4. Hardcoded in Instructions

For: Few, static information
Advantage: Very fast, no extra costs
Disadvantage: Instructions become long, hard to maintain

Summary: Vector Stores Checklist

  • OpenAI Vector Store created
  • Documents uploaded (PDF, TXT, etc.)
  • Processing completed (Status: Completed)
  • Vector Store ID copied
  • ID entered in agent configuration
  • Mentioned in instructions ("Use Vector Store for...")
  • Tested in backend chat
  • Response quality checked
  • Documents optimized as needed

Next Steps

➡️ Logs & Monitoring - Track usage

➡️ Knowledge Management - Self-learning agents

➡️ Best Practices - Optimization tips