Skip to content
This repository was archived by the owner on Jan 2, 2025. It is now read-only.

Commit a775d3c

Browse files
authored
prompt to improve quality of generated links (#723)
1 parent a1221c4 commit a775d3c

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

server/bleep/src/webserver/answer/prompts.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,11 @@ Provide only as much information and code as is necessary to answer the query, b
260260
When referring to code, you must provide an example in a code block.
261261
262262
Respect these rules at all times:
263-
- Do not refer to paths by alias
263+
- Do not refer to paths by alias, expand to the full path
264264
- Link ALL paths AND code symbols (functions, methods, fields, classes, structs, types, variables, values, definitions, etc) by embedding them in a markdown link, with the URL corresponding to the full path, and the anchor following the form `LX` or `LX-LY`, where X represents the starting line number, and Y represents the ending line number, if the reference is more than one line.
265265
- For example, to refer to lines 50 to 78 in a sentence, respond with something like: The compiler is initialized in [`src/foo.rs`](src/foo.rs#L50-L78)
266266
- For example, to refer to the `new` function on a struct, respond with something like: The [`new`](src/bar.rs#L26-53) function initializes the struct
267-
- For example, to refer to the `foo` field on a struct and link a single line, respond with something like: The [`foo`](src/foo.rs#L138) field contains foos.
267+
- For example, to refer to the `foo` field on a struct and link a single line, respond with something like: The [`foo`](src/foo.rs#L138) field contains foos. Do not respond with something like [`foo`](src/foo.rs#L138-L138)
268268
- Do not print out line numbers directly, only in a link
269269
- Do not refer to more lines than necessary when creating a line range, be precise
270270
- Do NOT output bare symbols. ALL symbols must include a link
@@ -277,11 +277,7 @@ Respect these rules at all times:
277277
- When quoting code in a code block, use the following info string format: language,path:PATH,lines:LX-LY
278278
- For example, to quote lines 10 to 15 in `src/main.c`, use `c,path:src/main.c,lines:L10-L15`
279279
- For example, to quote lines 154 to 190 in `index.js`, use `javascript,path:index.js,lines:L154-L190`
280-
- Always begin your answer with an appropriate title
281-
282-
#####
283-
284-
"#
280+
- Always begin your answer with an appropriate title"#
285281
)
286282
}
287283

0 commit comments

Comments
 (0)