feat: add Prompt module for grounded RAG query construction - #52
Open
ParamThakkar123 wants to merge 2 commits into
Open
feat: add Prompt module for grounded RAG query construction#52ParamThakkar123 wants to merge 2 commits into
ParamThakkar123 wants to merge 2 commits into
Conversation
Introduces a Prompt module with: - FUNSQL system prompt and customizable PromptTemplate - Context formatting from retrieved chunks - Build prompts for LLM query construction Includes full test coverage and documentation page.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## retrieval #52 +/- ##
=============================================
+ Coverage 65.96% 69.05% +3.09%
=============================================
Files 12 13 +1
Lines 526 585 +59
=============================================
+ Hits 347 404 +57
- Misses 179 181 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The Documentation job failed with six unresolvable `@ref` targets, from two separate causes: - `Chunk`, `HeaderChunk` and the rest of the chunking API are defined and exported by the `Ingestion` submodule but were never re-exported from `HealthLLM`, so `[`Chunk`](@ref)` in querying.md (which runs under `CurrentModule = HealthLLM`) had no binding to resolve against. Add them to the `import .Ingestion:` and `export` lists alongside the other ingestion names. - Documenter resolves `@ref`s inside a docstring in that docstring's own module. The `Prompt` docstrings reference `retrieve`, `search` and `Chunk`, none of which `Prompt` imports, so they failed as `HealthLLM.Prompt.retrieve` and friends. Qualify them with the `[`name`](@ref Module.name)` form, which keeps the rendered link text unchanged. `julia --project=docs docs/make.jl` now completes CrossReferences and RenderDocument with no errors. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RYi1NAjjGQ848cUMLEbh1x
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/prompt.jl): IntroducesFUNSQL_SYSTEM_PROMPT,PromptTemplate,DEFAULT_FUNSQL_TEMPLATE,format_context, andbuild_promptfor constructing grounded LLM prompts from retrieved chunksHealthLLM.jlpublic API and docstest/PromptTest.jlquerying.mdpage with usage examplesThis completes the RAG pipeline by adding the final step: formatting retrieved context into a structured prompt for LLM-based FUNSQL query generation.