I want use `gpt-3.5-turbo` for nlp task
See original GitHub issueI sometimes use gpt-3.5-turbo
for NLP tasks like text-davinci-003
.
Because it’s cheaper and feels like it performs much better than Curie
.
But there are some problems with this. In the current version of python-preview, if I use the chat backend, it forces the template to record the user’s conversation. This increases the number of tokens I use, which is costly. Also, if I’m dealing with long texts, it hits token limit in no time. like example below.
This can be solved by putting a memorization setting in the PromptTemplateConfig
class and modifying the semantic-kernel/python/semantic_kernel/orchestration/sk_function.py
, as shown in the photo below.
But I didn’t open the PR because I’m not sure if it will match the direction Microsoft is looking at.
In the same vein, I’d like to see ChatCompletion
imported via import_semantic_skill_from_directory
the way it’s done in the text-davinci-003
. Currently I’m importing skills the following way and it feels unnatural, please let me know if I’m missing something.
def import_skills(
kernel: sk.Kernel, skill_dir="./skills"
) -> Dict[str, sk.SKFunctionBase]:
skills = {}
for skill in os.listdir(skill_dir):
if skill.endswith("Skill"):
s = kernel.import_semantic_skill_from_directory(skill_dir, skill)
skills[skill] = s
skills["ChatSkills"] = {}
skills["ChatSkills"][
"ExtractInformationList"
] = extract_information.build_semantic_chat_function(kernel)
return skills
I think using skprompt.yaml
for prompt template instead of skprompt.txt
would allow for a much freer use of the model.
Issue Analytics
- State:
- Created 6 months ago
- Comments:11 (6 by maintainers)
Top GitHub Comments
@joowon-dm-snu ported, see https://github.com/microsoft/semantic-kernel/pull/643. Will be available with the next version of the pip package
@joowon-dm-snu @tynguyen this is now implemented, pls see the latest nuget 0.12
example: https://github.com/microsoft/semantic-kernel/blob/main/samples/dotnet/kernel-syntax-examples/Example26_SemanticFunctionsUsingChatGPT.cs