Skip to content

Release: Datastore Loaders - 2025.10.29 - #646

Merged
maxtechera merged 1 commit into
productionfrom
staging
Oct 29, 2025
Merged

Release: Datastore Loaders - 2025.10.29#646
maxtechera merged 1 commit into
productionfrom
staging

Conversation

@maxtechera

@maxtechera maxtechera commented Oct 29, 2025

Copy link
Copy Markdown
Collaborator

Summary

  • Add AnswerAgentAI Datastore loaders for Domains, Tags, and Transcripts

Changes

Testing

  • Verify domain datastore loader
  • Test tags datastore loader
  • Validate transcript datastore loader

…gs, and Transcripts (#643)

This PR introduces three new LangChain-compatible Document Loaders that
pull structured content from the AnswerAgentAI Datastore (Supabase) to
power ingestion, chunking, and downstream RAG/search use cases. Each
loader exposes rich filters, safe metadata shaping, and an optional text
output mode.

What’s included
- AAIDomains loader
(packages/components/nodes/documentloaders/AAIDomains/AAIDomains.ts)
- Filters: searchTerm (domain_name/meta_title/meta_description),
includeTags/excludeTags, includeTagsLogic (OR/AND), isValid
(all/true/false/null), hasAnalysis (all/analyzed/not_analyzed), limit
- Pagination with page size up to 100; stops early when results
exhausted
- Reliability: 60s fetch timeout + exponential backoff (3 retries) +
small inter-page delay
- Performance: selects only essential fields; explicitly excludes heavy
JSONB history fields
- Tag handling: flattens domain_tags join to tags array; supports
include/exclude logic
- Content: builds markdown pageContent with AI analysis (optional) +
meta info
- Metadata: includes core fields, AI-derived fields, tag slugs/labels,
ISO timestamps, and numeric timestamp variants; source markers
(source=aai_datastore, source_type=domain)
- Metadata shaping: merge additional metadata; omit via keys list or *
to keep only custom metadata
  - Output: Document[] or concatenated text (with TextSplitter support)

- AAITags loader
(packages/components/nodes/documentloaders/AAITags/AAITags.ts)
- Filters: searchTerm (slug/label/description), parentTagsOnly,
childTagsOnly, limit
  - Optional inclusion of parent tag info via self-join alias
  - Content: simple text summary of tag, description, parent
- Metadata: core fields, parent refs, hierarchy flags, timestamps,
source markers (source=aai_datastore, source_type=tag)
  - Metadata shaping and text output mode consistent with Domains loader

- AAITranscripts loader
(packages/components/nodes/documentloaders/AAITranscripts/AAITranscripts.ts)
- Filters (per visible portion of diff): searchTerm
(transcript/summary), dateFrom/dateTo (ISO), includeTags/excludeTags
with OR/AND logic, hasAnalysis, sentimentMin/sentimentMax, limit
- Consistent metadata shaping and output behavior with the other loaders
- Note: diff snippet was truncated; remaining implementation aligns with
the same patterns (Supabase client, filters, Document construction)

- Assets
  - answerai-square-black.png icon added for each loader

Environment variables
- AAI_DATASTORE_SUPABASE_URL
- AAI_DATASTORE_SUPABASE_SERVICE_ROLE_KEY
Notes:
- These use the service role key; do not expose in client/browser
contexts.
- Required for all three loaders.

Why
- Provide first-class, configurable ingestion nodes for AAI data
(domains, tags, transcripts), enabling targeted datasets via tags,
validity/analysis state, and date/sentiment filters.
- Improve resiliency and performance for large domain tables while
avoiding heavy JSON fields.

Testing/Verification
- Set AAI_DATASTORE_SUPABASE_URL and
AAI_DATASTORE_SUPABASE_SERVICE_ROLE_KEY in your environment
- In the node builder:
- AAIDomains: try limit=50, includeTags="saas,ecommerce",
includeTagsLogic="AND", hasAnalysis="analyzed"; verify tags/metadata and
AI analysis sections are present when enabled
- AAITags: set parentTagsOnly=true then childTagsOnly=true; verify
parent info appears when includeParentInfo=true
- AAITranscripts: filter by dateFrom/dateTo and a couple of tag slugs;
adjust sentimentMin/sentimentMax; verify results and metadata
- Switch output to “text” to confirm concatenation and escaping behavior
- Optionally test TextSplitter to ensure documents chunk as expected

Performance/Security
- Domains loader limits selected columns and paginates to reduce payload
size
- 60s request timeout, exponential backoff, and inter-page delay help
protect the datastore
- Uses service-role key; ensure server-side execution only

Breaking changes
- None

Documentation
- Add “AnswerAgentAI Datastore” section to internal docs covering:
  - Required env vars
  - Node inputs/filters and examples
  - Metadata keys, omit rules, and source markers
  - Known constraints (service-role usage, large-table pagination)

Links
- Diff:
https://patch-diff.githubusercontent.com/raw/the-answerai/theanswer/pull/643.diff

Sources:

https://patch-diff.githubusercontent.com/raw/the-answerai/theanswer/pull/643.diff

---------

Co-authored-by: Max Techera <maxi.techerag@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 29, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
answerai-docs Ready Ready Preview Oct 29, 2025 5:04pm
the-answerai Ready Ready Preview Oct 29, 2025 5:04pm

@maxtechera
maxtechera merged commit 07027ff into production Oct 29, 2025
11 of 12 checks passed
@maxtechera
maxtechera temporarily deployed to staging - aai-unified2-flowise-moonstruck October 29, 2025 17:11 — with Render Inactive
@maxtechera maxtechera changed the title Release: Staging to Production - 2025.10.29 Release: Datastore Loaders - 2025.10.29 Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants