<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: opengrowthai_dev</title>
    <description>The latest articles on DEV Community by opengrowthai_dev (@opengrowthai_dev).</description>
    <link>https://dev.to/opengrowthai_dev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4056209%2F43cd74ed-14f9-4b21-aea8-5de83fe36fcc.png</url>
      <title>DEV Community: opengrowthai_dev</title>
      <link>https://dev.to/opengrowthai_dev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/opengrowthai_dev"/>
    <language>en</language>
    <item>
      <title>Tracing ORAG's Path from Document Ingestion to Hybrid Retrieval</title>
      <dc:creator>opengrowthai_dev</dc:creator>
      <pubDate>Sun, 02 Aug 2026 00:45:38 +0000</pubDate>
      <link>https://dev.to/opengrowthai_dev/tracing-orags-path-from-document-ingestion-to-hybrid-retrieval-3pek</link>
      <guid>https://dev.to/opengrowthai_dev/tracing-orags-path-from-document-ingestion-to-hybrid-retrieval-3pek</guid>
      <description>&lt;h2&gt;
  
  
  Project Background
&lt;/h2&gt;

&lt;p&gt;ORAG is a Go-native RAG service framework. Its repository describes an end-to-end workflow covering knowledge-base ingestion, hybrid retrieval, answer generation, evaluation, and optimization. The HTTP API is implemented with Hertz, while PostgreSQL and Qdrant are the default storage and retrieval dependencies.&lt;/p&gt;

&lt;p&gt;This article focuses on one Feature: the API service used as the entry point for ingestion and retrieval workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Developer Problem
&lt;/h2&gt;

&lt;p&gt;Developers evaluating a RAG project need to answer two practical questions before integrating it: what ingestion and retrieval capabilities are present, and where does the API process begin?&lt;/p&gt;

&lt;p&gt;ORAG's README documents JSON text import, multipart file upload, persisted ingestion jobs, and hybrid retrieval that combines dense and sparse retrieval with fusion and reranking. The process entry point is visible in &lt;code&gt;cmd/orag-api/main.go&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Feature Value
&lt;/h2&gt;

&lt;p&gt;The repository presents ingestion and retrieval as connected parts of one service rather than unrelated utilities. The documented ingestion routes include &lt;code&gt;/documents:import&lt;/code&gt;, &lt;code&gt;/documents&lt;/code&gt;, and &lt;code&gt;/ingestion-jobs/{id}&lt;/code&gt;. Hybrid retrieval uses Qdrant for dense retrieval and PostgreSQL full-text search for sparse retrieval, followed by fusion and reranking.&lt;/p&gt;

&lt;p&gt;For an API consumer, this provides a concrete starting map: import content, observe the ingestion job, and then use the retrieval pipeline through the service's HTTP contract.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technical Implementation
&lt;/h2&gt;

&lt;p&gt;The executable entry point in &lt;code&gt;cmd/orag-api/main.go&lt;/code&gt; keeps startup responsibilities explicit:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Load configuration with &lt;code&gt;config.Load()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Create the structured logger.&lt;/li&gt;
&lt;li&gt;Build the application through &lt;code&gt;core.New&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Register application cleanup.&lt;/li&gt;
&lt;li&gt;Log the redacted startup configuration.&lt;/li&gt;
&lt;li&gt;Construct the HTTP server and call Hertz &lt;code&gt;Spin()&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The README supplies the wider ingestion and retrieval architecture. The entry-point file establishes how the API process starts; it does not by itself prove throughput, latency, or successful operation in a particular environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;The repository's documented local walkthrough requires Docker Desktop and &lt;code&gt;docker compose&lt;/code&gt;. From the repository root, the documented command is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make demo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;According to the README, this path enables deterministic mocks and starts PostgreSQL, Qdrant, migrations, the API, and the Console before exercising ingestion, a cited query, trace lookup, and evaluation.&lt;/p&gt;

&lt;p&gt;This command was not executed while preparing this article. Treat it as the repository's documented starting point, not as a guarantee that a particular machine is already configured correctly. The README also documents &lt;code&gt;make demo-down&lt;/code&gt; for stopping the walkthrough.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limitations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The default &lt;code&gt;qdrant_postgres&lt;/code&gt; backend requires PostgreSQL and Qdrant.&lt;/li&gt;
&lt;li&gt;The documented demo uses deterministic mocks and is intended for local exploration and regression checks, not as a production credential template.&lt;/li&gt;
&lt;li&gt;This article does not validate runtime behavior, API responses, throughput, or retrieval quality.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  GitHub Project
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/shikanon/orag" rel="noopener noreferrer"&gt;Explore the ORAG repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If this project is useful to you, consider starring the repository on GitHub.&lt;/p&gt;

&lt;h2&gt;
  
  
  Contributing
&lt;/h2&gt;

&lt;p&gt;Before opening a Pull Request, read the verified &lt;a href="https://github.com/shikanon/orag/blob/master/CONTRIBUTING.md" rel="noopener noreferrer"&gt;contribution guide&lt;/a&gt;. A useful contribution would include reproducible setup details, the relevant command or API path, expected behavior, and observed behavior.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get Involved
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Explore the implementation in the &lt;a href="https://github.com/shikanon/orag" rel="noopener noreferrer"&gt;project repository&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Report reproducible problems through the &lt;a href="https://github.com/shikanon/orag/issues" rel="noopener noreferrer"&gt;Issue tracker&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;No verified GitHub Discussions entry was found in the scanned repository evidence.&lt;/li&gt;
&lt;li&gt;Review the &lt;a href="https://github.com/shikanon/orag/blob/master/CONTRIBUTING.md" rel="noopener noreferrer"&gt;contribution guide&lt;/a&gt; before preparing a Pull Request.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Evidence and Verification
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Commit SHA: &lt;code&gt;534af21861be408fd4947ebae8e3e4db77e0a7e2&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Feature evidence paths:

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cmd/orag-api/main.go&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;README.md&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Verification status: Not runtime verified: this article is based on static repository evidence.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>architecture</category>
      <category>backend</category>
      <category>go</category>
      <category>rag</category>
    </item>
    <item>
      <title>Inside ORAG's Go API Startup Path: Configuration, Logging, and Failure Handling</title>
      <dc:creator>opengrowthai_dev</dc:creator>
      <pubDate>Fri, 31 Jul 2026 11:50:53 +0000</pubDate>
      <link>https://dev.to/opengrowthai_dev/inside-orags-go-api-startup-path-configuration-logging-and-failure-handling-5238</link>
      <guid>https://dev.to/opengrowthai_dev/inside-orags-go-api-startup-path-configuration-logging-and-failure-handling-5238</guid>
      <description>&lt;h2&gt;
  
  
  Project Background
&lt;/h2&gt;

&lt;p&gt;ORAG is a Go project whose API process starts in &lt;code&gt;cmd/orag-api/main.go&lt;/code&gt;. This article is for Go developers and system administrators who want to understand how that process initializes before the HTTP server begins serving requests.&lt;/p&gt;

&lt;p&gt;It focuses on one Feature: &lt;strong&gt;API Server Initialization and Logging&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Developer Problem
&lt;/h2&gt;

&lt;p&gt;An API server's startup path is easy to overlook until initialization fails. A useful entry point should make several questions answerable from the code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What happens when configuration cannot be loaded?&lt;/li&gt;
&lt;li&gt;Is logging available before the application is constructed?&lt;/li&gt;
&lt;li&gt;Can the HTTP server start after application initialization fails?&lt;/li&gt;
&lt;li&gt;How are shutdown errors surfaced?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;ORAG keeps these decisions in a small &lt;code&gt;run&lt;/code&gt; function, separate from &lt;code&gt;main&lt;/code&gt;, so the initialization sequence and its failure behavior can be inspected directly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Feature Value
&lt;/h2&gt;

&lt;p&gt;The separation makes the startup boundary explicit. Configuration loading, logger construction, application initialization, cleanup registration, and HTTP server startup remain visible in one function. The application builder and server starter are injected, allowing a focused test to replace them without starting a real server.&lt;/p&gt;

&lt;p&gt;This does not prove that ORAG will start successfully in every environment. It does make the application-initialization failure path directly inspectable and testable in the repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technical Implementation
&lt;/h2&gt;

&lt;p&gt;The process starts in &lt;code&gt;cmd/orag-api/main.go&lt;/code&gt;. Its &lt;code&gt;main&lt;/code&gt; function calls &lt;code&gt;run&lt;/code&gt; with three dependencies:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A background context.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;core.New&lt;/code&gt;, which builds the application.&lt;/li&gt;
&lt;li&gt;A server starter that creates the HTTP server and calls &lt;code&gt;Hertz().Spin()&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The &lt;code&gt;run&lt;/code&gt; function then performs startup in a fixed order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Load configuration.&lt;/strong&gt; It calls &lt;code&gt;config.Load()&lt;/code&gt;. If loading fails, it writes a standard log message and returns exit code &lt;code&gt;1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create the structured logger.&lt;/strong&gt; After configuration succeeds, it calls &lt;code&gt;logger.New(cfg.Server.Debug)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build the application.&lt;/strong&gt; The injected &lt;code&gt;buildApp&lt;/code&gt; function receives the context, configuration, and logger. An initialization error is logged as &lt;code&gt;init app failed&lt;/code&gt;, and &lt;code&gt;run&lt;/code&gt; returns &lt;code&gt;1&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Register cleanup.&lt;/strong&gt; Once the application exists, a deferred call closes it. A close failure is logged as &lt;code&gt;close app failed&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Log startup context.&lt;/strong&gt; Before starting the server, ORAG logs &lt;code&gt;starting orag api&lt;/code&gt; with the configured address and &lt;code&gt;cfg.RedactedEnv()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Start the server.&lt;/strong&gt; The injected starter receives the initialized application. If control returns normally, &lt;code&gt;run&lt;/code&gt; returns &lt;code&gt;0&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In &lt;code&gt;cmd/orag-api/main_test.go&lt;/code&gt;, the application builder deliberately returns an error. The test checks that &lt;code&gt;run&lt;/code&gt; returns &lt;code&gt;1&lt;/code&gt; and that the server starter is not called. This is the repository evidence for the guarded initialization failure path; it is not a runtime result produced while preparing this article.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;These steps explain how to inspect the startup flow. They do not guarantee that the API will run in a particular environment, because successful startup depends on configuration and dependencies outside the two evidence files used here.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;code&gt;cmd/orag-api/main.go&lt;/code&gt; and locate &lt;code&gt;main&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Trace &lt;code&gt;run&lt;/code&gt; from configuration loading through the injected application builder and server starter.&lt;/li&gt;
&lt;li&gt;Open &lt;code&gt;cmd/orag-api/main_test.go&lt;/code&gt; and inspect the test that makes the builder return an error.&lt;/li&gt;
&lt;li&gt;Consult the repository documentation for the full configuration and dependency requirements before attempting to start the service.&lt;/li&gt;
&lt;li&gt;If you decide to try the documented entry file from the repository root, the corresponding Go command is:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   go run cmd/orag-api/main.go
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The command was not executed during this article's evidence collection. A configuration error or missing dependency would not contradict the static control flow described above.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limitations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;If &lt;code&gt;buildApp&lt;/code&gt; fails, the application exits with a non-zero status code.&lt;/li&gt;
&lt;li&gt;The cited test covers application initialization failure; it does not establish runtime behavior for a successfully running HTTP server.&lt;/li&gt;
&lt;li&gt;The command and startup output described here were not executed as part of this article's evidence collection.&lt;/li&gt;
&lt;li&gt;The complete configuration contract is outside the two evidence files used for this Feature.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  GitHub Project
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/shikanon/orag" rel="noopener noreferrer"&gt;Explore the ORAG repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If this project is useful to you, consider starring the repository on GitHub.&lt;/p&gt;

&lt;h2&gt;
  
  
  Contributing
&lt;/h2&gt;

&lt;p&gt;Before preparing a Pull Request, read the verified &lt;a href="https://github.com/shikanon/orag/blob/master/CONTRIBUTING.md" rel="noopener noreferrer"&gt;contribution guide&lt;/a&gt;. A useful report or contribution should include reproducible setup details, the relevant startup stage, expected behavior, and observed behavior.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get Involved
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Inspect the startup implementation in the &lt;a href="https://github.com/shikanon/orag" rel="noopener noreferrer"&gt;project repository&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Report a reproducible startup problem through the &lt;a href="https://github.com/shikanon/orag/issues" rel="noopener noreferrer"&gt;Issue tracker&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;No verified GitHub Discussions entry was found in the scanned repository evidence.&lt;/li&gt;
&lt;li&gt;Review the &lt;a href="https://github.com/shikanon/orag/blob/master/CONTRIBUTING.md" rel="noopener noreferrer"&gt;contribution guide&lt;/a&gt; before proposing a change.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Evidence and Verification
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Commit SHA: &lt;code&gt;534af21861be408fd4947ebae8e3e4db77e0a7e2&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Feature: &lt;code&gt;API Server Initialization and Logging&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Evidence paths:

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;cmd/orag-api/main.go&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cmd/orag-api/main_test.go&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Verification status: Not runtime verified: this article is based on static repository evidence.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>api</category>
      <category>architecture</category>
      <category>backend</category>
      <category>go</category>
    </item>
  </channel>
</rss>
