(agent_name: &str, prompt: &str, explicit_target: Option<&str>)
| 356 | } |
| 357 | |
| 358 | fn explicit_agent_confidence(agent_name: &str, prompt: &str, explicit_target: Option<&str>) -> f32 { |
| 359 | let name = agent_name.to_lowercase(); |
| 360 | if explicit_target |
| 361 | .map(|target| agent_name_matches(agent_name, target)) |
| 362 | .unwrap_or(false) |
| 363 | || contains_explicit_reference(prompt, &name) |
| 364 | { |
| 365 | 0.96 |
| 366 | } else { |
| 367 | 0.0 |
| 368 | } |
| 369 | } |
| 370 | |
| 371 | fn description_confidence(description: &str, prompt: &str) -> f32 { |
| 372 | let shared_terms = significant_terms(description) |
no test coverage detected