kitops icon indicating copy to clipboard operation
kitops copied to clipboard

Add prompts layer to ModelKit

Open bmicklea opened this issue 4 months ago • 5 comments

Describe the problem you're trying to solve When developing a gen AI model the system and user prompts used for validation, in-production use are critical to the end result.

Describe the solution you'd like It would be great to have the option of storing these in the ModelKit directly, or as a reference to git. Making prompts its own layer would make it trivial to pull only the prompts in cases where a dev was iterating on those.

Describe alternatives you've considered Storing prompts in git works, and you can even add the repo to the code layer in a ModelKit, but being able to have a dedicated layer would make things easier to track and rev.

bmicklea avatar Aug 20 '25 14:08 bmicklea

I made some changes to the repository code to add a new layer to the docker image dedicated to just all the prompt files. I changed these files

mediaType.go FiltersFromUnpackConf | filter.go | shouldUnpackLayer | filter.go | saveKitfileLayers | local-storage.go | unpackRecursive | core.go |

Am i missing some change here? I am new to the codebase.

Eshan-Jogwar avatar Nov 07 '25 11:11 Eshan-Jogwar

@Eshan-Jogwar it sounds correct to me but you can issue a draft pull-request and we can have a quick look.

gorkem avatar Nov 07 '25 15:11 gorkem

hey after those changes i am getting an error in unpacking the code layer

Image

if there is some context you could provide me about this error.

the pack command runs correctly and also gives out that the prompt layer is made with the sha256

Image

this is the manifest inspect after pulling from the registry

Image

This is the final error Image

Eshan-Jogwar avatar Nov 08 '25 15:11 Eshan-Jogwar

hey i figured the error out. now it is working.

Eshan-Jogwar avatar Nov 10 '25 11:11 Eshan-Jogwar

should i also include a --prompt in the cli to only unpack the prompts layer like the code layer?

Eshan-Jogwar avatar Nov 13 '25 08:11 Eshan-Jogwar