Remix.run Logo
jsunderland323 3 hours ago

I'm working on a CLI now.

The pattern I used was this:

1) made a docs command that printed out the path of the available docs

$ my-cli docs

- README.md

- DOC1.md

- dir2/DOC2.md

2) added a --path flag to print out a specific doc (tried to keep each doc less than 400 lines).

$ my-cli docs --path dir2/DOC2.md

# Contents of DOC2.md

3) added embeddings so I could do semantic search

$ my-cli search "how do I install x?"

[1] DOC1.md

"You can install x by ..."

[2] dir2/DOC2.md

"after you install..."

You then just need a simple skill to tell the agent about the docs and search command.

I actually love this as a pattern, it works really well. I got it to work with i18n too.

danw1979 2 hours ago | parent [-]

I really like this - especially the embedded search. What do the embeddings and model cost you in terms of binary size ?

jsunderland323 2 hours ago | parent [-]

Umm it's not as bad I thought it would be. ~16mb per locale. ~28k words in the english docs.

Not schilling, just easier to show you the repo since it's open source. https://github.com/coast-guard/coasts