Bitcoin Cryptocurrency Mastering Development

When importing a wallet from private key or seed phrase, how do you guess the correct address format?

I am building a bitcoin wallet. I can derive addresses using the derivation paths. How do I determine the derivation path for the seed when importing it?