Skip to main content

Verity: The Fiscal Truth Engine

Overview

Verity shows how RavenDB supports regulated document workflows where ingestion, AI analysis, auditability, and downstream delivery all need to stay traceable. SEC EDGAR filings are imported into RavenDB, large payloads are stored as remote attachments, and database-managed AI tasks analyze filing chunks and profitability signals.

The business value is accountability. RavenDB keeps the operational records, revisions, subscriptions, queue delivery, replication setup, and AI configuration connected, so teams can see what changed, what was analyzed, and what downstream consumers received. Azure Storage and Azure Queues support the workflow without becoming competing operational records.

Features used

Verity configures the OpenAI connection and adds GenAI tasks during database migration. The tasks are part of the RavenDB database setup, so analysis is tied to document changes instead of being a detached worker convention.

DocumentStore.Maintenance.Send(new PutConnectionStringOperation<AiConnectionString>(
new AiConnectionString { Name = connectionName, ModelType = AiModelType.Chat }
));

DocumentStore.Maintenance.Send(new AddGenAiOperation(new ChunkAnalysisTask(connectionName)));
DocumentStore.Maintenance.Send(new AddGenAiOperation(new ProfitabilityTask(connectionName)));

The assistant layer is configured from the same RavenDB AI connection string as the GenAI tasks. That keeps interactive review close to the governed database instead of letting a separate chatbot copy filings into its own store.

VerityAgentCreator
.Create(DocumentStore, connectionName)
.GetAwaiter()
.GetResult();

SEC filings and derived artifacts can be large. Remote Attachments let the application keep those files in Azure Storage while RavenDB maintains the document relationship, metadata, and retrieval flow. This keeps the database model coherent without forcing every byte of filing content into local database files.

Verity configures RavenDB Queue ETL with Azure Queue Storage. RavenDB can project relevant revision or audit data into a queue without custom polling code watching every document change.

DocumentStore.Maintenance.Send(new PutConnectionStringOperation<QueueConnectionString>(
new QueueConnectionString
{
BrokerType = QueueBrokerType.AzureQueueStorage,
AzureQueueStorageConnectionSettings = new AzureQueueStorageConnectionSettings
{
ConnectionString = context.AzureStorageConnectionString
}
}));

DocumentStore.Maintenance.Send(new AddEtlOperation<QueueConnectionString>(
AuditRevisionQueueEtlTask.Create()));

The subscription app watches selected companies and receives report notifications from RavenDB. The worker can stay simple because RavenDB handles delivery, batching, and subscription ownership.

var worker = store.Subscriptions.GetSubscriptionWorker<ReportNotification>(
new SubscriptionWorkerOptions(subscriptionName)
{
Strategy = SubscriptionOpeningStrategy.WaitForFree
});

await worker.Run(batch =>
{
foreach (var item in batch.Items)
AnsiConsole.MarkupLine($"[cyan]Analyzed:[/] {item.Result.Filing}");
}, ct);

Financial reports are not disposable notes. Verity uses RavenDB revisions for historical accountability, document expiration for cleanup, and data archival for records that should remain retrievable without staying active in indexes and subscriptions.

Technologies

Run locally

  1. Check out the repository.
  2. Install Docker, .NET 10.x, Node.js 22.x, Aspire, and Azure Functions Core Tools.
  3. Run aspire run.
  4. When Aspire prompts for parameters, provide a SEC user agent, an OpenAI API key, an Azure Storage connection string, and a RavenDB license.

Notes

Verity focuses on U.S.-based companies because the workflow expects 10-K and 10-Q reports from SEC EDGAR.

Community & Support

If you spot a bug, have an idea, or want to ask a question, open an issue or pull request in the repository. The RavenDB team also hangs out on the RavenDB Discord server.

Contributing

Contributions are welcome. See the repository's CONTRIBUTING file for details.

License

This project is licensed with the MIT license.

In this article