Embedding Patterns
Real-time AI pipelines can generate and manage embeddings in several ways, depending on where the model runs, how much latency the application can tolerate, and how tightly embedding generation must be coupled with transactional replication. Oracle GoldenGate supports multiple embedding patterns that allow organizations to enrich data as it moves through the replication pipeline, rather than relying only on separate batch jobs or downstream post-processing. The two most common approaches are to invoke an external AI service using @AISERVICE, or to call database-resident embedding logic using @DBFUNCTION. Both patterns enable embeddings to be created during data movement, but they differ in performance characteristics, operational dependencies, resource usage, and consistency guarantees. Choosing the right pattern requires balancing throughput, latency, model governance, service availability, and the need to keep generated vectors synchronized with the source data.
| Pattern | Best For | Watch out for |
|---|---|---|
@AISERVICE |
GPU-backed models; centralized AI services; scalable inference outside the database | Network latency; retry behavior; service availability; external dependency management |
@DBFUNCTION |
In-database embedding; tight coupling with target apply logic; local governance | Database CPU usage; function runtime; Replicat lag; resource isolation |