Skip to content

I want use gpt-3.5-turbo for nlp task #337

@joowon-dm-snu

Description

@joowon-dm-snu

I 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.
image

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.
image

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.

Metadata

Metadata

Assignees

Labels

pythonPull requests for the Python Semantic Kernel

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions