liveBook · Manning

Metadata

As explained in Financial AI in Practice

Metadata is descriptive information about data that identifies its attributes, context, structure, provenance, or meaning.

In a news retrieval system, metadata travels with each stored document to identify its source, date, and URL. Alongside vectors and source text, it supports auditability and compliance. section 11.3.4

Listing 11.8 Initializing ChromaDB and storing the embedded news
import chromadb

df = pd.read_parquet('news_embedded.parquet')

print("="*80)
print("STEP 3: VECTOR DATABASE STORAGE")
print("="*80)

# Initialize ChromaDB
chroma_client = chromadb.PersistentClient(path="./chroma_db")

# Delete old collection if exists
try:
    chroma_client.delete_collection("news")
    print("Deleted existing collection")
except:
    pass

# Create new collection
collection = chroma_client.create_collection("news")

# Batch insert
ids = [str(i) for i in range(len(df))]
collection.add(
    ids=ids,
    embeddings=df['embedding'].tolist(),
    documents=df['text_for_embedding'].tolist(),
    metadatas=df['metadata'].tolist()
)

print(f"Stored {len(df)} documents")
print(f"Collection name: {collection.name}")
print(f"Total count: {collection.count()}")

See how ChromaDB stores metadata alongside document text and embeddings. section 11.3.4

How Financial AI in Practice covers it

How deep it goes
Stores metadata alongside vectors and source text, naming source, date, and URL without detailing a metadata schema.
Examples
Uses source, date, and URL as metadata for stored news articles.
What you can do after
Apply it via ChromaDB to store metadata alongside document IDs, embeddings, and source text.
How it connects
Connects metadata to vector databases, embeddings, and retrieval-augmented generation.

Also explained in

Compare how 21 books explain metadata →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Financial AI in Practice. The section links point to the parts of the book it draws on.